View Single Post

   
  #8 (permalink)  
Old 04-17-2008, 09:32 PM
George Weaver
 
Posts: n/a
Default Re: shutdown postmaster question

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

pause

stop.bat contained:

bash pg_ctl stop -D /usr/share/postgresql/data


----- Original Message -----
From: <operationsengineer1@yahoo.com>
To: "George Weaver" <gweaver@shaw.ca>; <pgsql-novice@postgresql.org>
Sent: Thursday, February 24, 2005 12:27 PM
Subject: Re: [NOVICE] shutdown postmaster question


>
> --- George Weaver <gweaver@shaw.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
>>
>> Regards,
>> George

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

Regards,
Geroge


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote