Re: Starting PostgreSQL as an NT Service

John Meinel <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
-----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-----

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [email protected] so that your
      message can get through to the mailing list cleanly
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.