Thread: postgresql as windows 2000 service problem

postgresql as windows 2000 service problem

From
kranas@freemail.gr
Date:
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

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.

Any help please;;


Re: postgresql as windows 2000 service problem

From
"Magnus Hagander"
Date:
> 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


Re: postgresql as windows 2000 service problem

From
"Merlin Moncure"
Date:
> > 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, silly question, but does postgres user have NTFS permissions to all
the files/folders?

Try starting service from the service manager and play with the log on
from there.

Merlin

Re: postgresql as windows 2000 service problem

From
"Jomar Andrade"
Date:
Try:

pg_ctl unregister
pg_ctl register -U postrges -P xxxxxx -o "-i" (to receive TCP/IP
connections)

Regards,

Jomar

----- Original Message -----
From: <kranas@freemail.gr>
To: <pgsql-hackers-win32@postgresql.org>
Sent: Wednesday, July 14, 2004 7:24 AM
Subject: [pgsql-hackers-win32] postgresql as windows 2000 service problem


>
> 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
>
> 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.
>
> Any help please;;
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html


Re: postgresql as windows 2000 service problem

From
Steve Holdoway
Date:
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 majordomo@postgresql.org
>
>
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