Re: Starting PostgreSQL as an NT Service - Mailing list pgsql-hackers-win32

From John Meinel
Subject Re: Starting PostgreSQL as an NT Service
Date
Msg-id 40E372A6.4020007@johnmeinel.com
Whole thread Raw
In response to Re: Starting PostgreSQL as an NT Service  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers-win32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Merlin Moncure wrote:

|
|
| There are couple of gotchas:
| 1. The account that is starting postgresql can not have administrator
| privileges.  This is a safety issue...works the same on unix.

I have done that.

|
| 2. The account starting postgresql must have 'log on as a service'
| privilege.  More about this in a sec.

Is there a way you can create this explicitly? I remember when I went to
Computer Management/Services, and chose the username of "postgres" it
told me that it gave the user "Log on as a service" rights.
|
| 3. Make sure the postgresql NT user (in your case: 'postgres') has
| permissions to the data folder.  Add this user to the folder and make
| sure you apply the permissions to the subfolders.  It goes without
| saying that the data folder should *not* be shared to the outside world
| in any way.
|
| 4. Make sure you ran initdb previous to attempting to resister server.
|
| You can omit the -U parameter to pg_ctl and play around with the
| accounts with the service directly (select log on as... in service
| properties).  It's easier there because you get more detailed error
| information and you don't have to keep re-registering the server.
|
| Merlin

Actually, I found out what was wrong. I had put 'c:\postgres\bin' and
'c:\postgres\lib' into my user path, but that meant it _wasn't_ in the
user postgres's path. After logging in as postgres, I modified the PATH
environment variable. And then it started up. I think the main issue is
it is looking for libpq.dll which exists in lib, because it can probably
find the rest of the programs that exist in bin.

I have to say, the error messages aren't very helpful. But I'm glad I
asked the question, because now someone might be able to find the
solution by searching.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA43KmJdeBCYSNAAMRAl5uAJ9ra/nQ4nAq0QiWmhkqSojPsWIgMwCfRHZL
FywOQ9QT/fBBpYAIA1qzVlE=
=elu0
-----END PGP SIGNATURE-----

pgsql-hackers-win32 by date:

Previous
From: "Darko Prenosil"
Date:
Subject: Re: Starting PostgreSQL as an NT Service
Next
From: Harald Armin Massa
Date:
Subject: PgSQL not as Administrator - probs on windows