Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Starting PostgreSQL as an NT Service


  • From: John Meinel <john(at)johnmeinel(dot)com>
  • To: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, pgsql-hackers-win32(at)postgresql(dot)org
  • Subject: Re: Starting PostgreSQL as an NT Service
  • Date: Wed, 30 Jun 2004 21:10:46 -0500
  • Message-id: <40E372A6.4020007@johnmeinel.com> <text/plain>

-----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-----



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group