I have used 2 batch files in the past.
The first was start.bat with the lines
bash pg_ctl start -D /usr/share/postgresql/data -o -i
bash pg_ctl stop -D /usr/share/postgresql/data
----- Original Message -----
To: "George Weaver" <gweaver(at)shaw(dot)ca>; <pgsql-novice(at)postgresql(dot)org>
Sent: Thursday, February 24, 2005 12:27 PM
Subject: Re: [NOVICE] shutdown postmaster question
> --- George Weaver <gweaver(at)shaw(dot)ca> wrote:
>> You might find starting and stopping postmaster
>> easier by using pg_ctl. Eg
>> in a batch file the following will stop the server:
>> bash pg_ctl stop -D /usr/share/postgresql/data
> i tried pg_ctl with no luck. i started with
> pg_ctl start
> but my pgdata environment variable wasn't set and i
> couldn't quickly find out how to set it via the docs.
See -D abvove
> i then tried
> pg_ctl /usr/share/postgresql/data start
> and received an invalid operation mode error.
> i'm not sure how pg_ctl handles the "-i" issue (tcp/ip
> connections) and whether the trailing "&" is required
> using pg_ctl. the docs and my php/pgsql book were
> unclear after an admittedly quick review.
-o is needed to pass options directly to the postmaster e.g. -i
In response to
pgsql-novice by date
|Next:||From: Bruce Momjian||Date: 2005-02-24 22:10:50|
|Subject: Re: [NOVICE] Question on TRUNCATE privleges|
|Previous:||From: Keith Worthington||Date: 2005-02-24 18:35:21|
|Subject: session_user id|