Re: postgresql as windows 2000 service problem

Steve Holdoway <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
Magnus Hagander wrote:

>>I have downloaded the binary snapshot from 13/7/2004 I have 
>>created a user postgres and give him log on as service right 
>>As user postgres I unzipped the binary snapshot to 
>>c:\postgres As Administrator I add to path c:\postgres\bin 
>>and c:\postgres\lib As postgres I run with success initdb -L 
>>"c:/postgres/share"
>>As postgres I can run (with success) pg_ctl start and pg_ctl 
>>stop As Administrator I run pg_ctl register -U postrges -P 
>>xxxxxx As Administtrator if i give net start postgresql I get 
>>the error 1067
>>    
>>
>
>Ok: Error 1067 is "The process terminated unexpectedly.". Looks like
>pg_ctl or the postmaster just fell over.
>
>Do you get any entries in the event log? And make sure you have enabled
>eventlog logging in postgresql.conf (off by default).
>
>
>  
>
>>I have done the same things in windows xp and everything worked fine.
>>The only difference I note is that in windows xp the user 
>>name in service postgresql is SERVER\postgres. In windows 
>>2000 is .\postgres.
>>    
>>
>
>They should be equivalant, and shouldn't have any effect on this.
>
>//Magnus
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to [email protected]
>  
>
I've been doing a bit of digging...

Latest snapshot, mingw with gcc 3.3.1. configure --without-zlib.

in <home>/src/bin/pg_ctl, within the generated exec.c code.

Line 313, runs popen "<dir>postmaster.exe" -V 2>nul to get version info 
as a check to see if it can find the program. This is returning a null 
file descriptor, as well as errno being set to 0 as well... now that 
informative!

I don't think the code is at fault here ( I've tried all the obvious 
things, including mangling the command string in any way I can think of, 
except for a windows version of adding sh -c at the start, if there is 
one... also playing around with popen open modes ), but it needs someone 
with far better Windoze programming skils than me to sort it out ):

Hopefully this will make some sense to someone.

Cheers,

Steve



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.