Re: Regarding installing & starting Postgres on Windows - Mailing list pgsql-general

From John R Pierce
Subject Re: Regarding installing & starting Postgres on Windows
Date
Msg-id 4A8DC1FC.8000105@hogranch.com
Whole thread Raw
In response to Regarding installing & starting Postgres on Windows  ("Vikram Patil" <vpatil@actuate.com>)
List pgsql-general
Vikram Patil wrote:
>
> Hello ,
>
> I am trying to find a way to install PostgreSQL through my script/code
> . I don’t want to use installer provided on websites.
>
> I compiled source and and I installed in one directory , Now I am
> trying to register it as a service or start database server directly.
>
> I read in FAQs that I can start database server by revoking
> administrative rights. But how I can do that is not mentioned there.
>


create a Windows account specifically to run the server. this account
needs RunAsService privilege (or whatever thats called), and needs 'full
control' over the postgres DATA directory and its contents.

you can create the service something like this from a CMD shell, so I'm
sure you can migrate this to your installer's setup script methods...

NET USER Postgres xyzzy
\path\to\pg_ctl register -N PGSQL-8.3 -U Postgres -P xyzzy -D
\oath\to\pg\data
runas /user:Postgres "\path\to\initdb -D \path\to\data -E locale"


note that this Postgres user account needs to have full access to the
data directory (which it will create if it doesn't exist, in which case,
it needs write access to the parent dir)

I don't quite know the command line magic to grant that process 'Log On
As a Service' privileges, however.




pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: Function for replace
Next
From: paulo matadr
Date:
Subject: Enc: Res: Function for replace