Thread: postgresql as windows 2000 service problem

postgresql as windows 2000 service problem

From
kranas@freemail.gr
Date:
In event log it says something like "unable to find exe file"
I have enabled logging in postgresql.conf but nothing else is logged.
When I start postgres as user 'postgres' with 'pg_ctl start', it logs
a lot of things: timezones, environment variables etc.

I don't know whice exe it means. It cant be the bath because
env system variables PATH and PGDATA are ok.

To which files/folders should user postrges have rights; I have created
user postrges as a typical user (admin or power user is not possible to
run pg_ctl) and gave him the log on as service right.
Also user postgres is the owner of the folder c:\postgres (with any subfolders).

I also tried 'pg_ctl register -U postgres -P xxxxx -o "-i" but the
same error.

The only thing that bothers me is that in windows xp it runs fine.




Re: postgresql as windows 2000 service problem

From
Darko Prenosil
Date:
Same error on win2000 few days ago(Check the archive).
I am preparing to put some debug messages into the code and see
what is actually happening.

Regards !

On Thursday 15 July 2004 07:17, kranas@freemail.gr wrote:
> In event log it says something like "unable to find exe file"
> I have enabled logging in postgresql.conf but nothing else is logged.
> When I start postgres as user 'postgres' with 'pg_ctl start', it logs
> a lot of things: timezones, environment variables etc.
>
> I don't know whice exe it means. It cant be the bath because
> env system variables PATH and PGDATA are ok.
>
> To which files/folders should user postrges have rights; I have created
> user postrges as a typical user (admin or power user is not possible to
> run pg_ctl) and gave him the log on as service right.
> Also user postgres is the owner of the folder c:\postgres (with any
> subfolders).
>
> I also tried 'pg_ctl register -U postgres -P xxxxx -o "-i" but the
> same error.
>
> The only thing that bothers me is that in windows xp it runs fine.
>
>
>
>
> ---------------------------(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
"Magnus Hagander"
Date:
> In event log it says something like "unable to find exe file"

Could we have the exact message, please?


> I have enabled logging in postgresql.conf but nothing else is logged.
> When I start postgres as user 'postgres' with 'pg_ctl start',
> it logs a lot of things: timezones, environment variables etc.

Sounds like it doesn't actually start postmaster. Assuming you set
log_destination=eventlog, those messages really should show up in the
application event log.


> I don't know whice exe it means. It cant be the bath because
> env system variables PATH and PGDATA are ok.

My first suggestion would be to doublecheck PATH. Remember that pg has
to be in the *system* path and not in your *user* path. The service has
a different set of env variables from the interactive user.


> To which files/folders should user postrges have rights; I
> have created user postrges as a typical user (admin or power
> user is not possible to run pg_ctl) and gave him the log on
> as service right.
> Also user postgres is the owner of the folder c:\postgres
> (with any subfolders).

It needs read access to the winnt dir (not all subdirs, but unless
you've changed something, a normal user has this). It also needs read
access to the c:\postgres directory, and write access tot he PGDATA
directory. That's it. I'd recommend *not* giving it ownership/write
permission on the postgres binary directories. The MSI installer will
eventually set an explicit DENY permission on these directories,
actually.


//Magnus