Thread: Re: starting the postmaster

Re: starting the postmaster

From
Brian
Date:
Hi John,

I am getting a FAILED notice on your construction.

if I delete the   >/dev/null 2>&1   I can see:

/usr/bin/pg_ctl: /usr/bin/postmaster -i: No such file or directory

as a response...

so I tried removing the single quotes ' and I get this as a response:

starting service pg_ctl: invalid option: -i

-------
still struggling here,
Brian




At 10:13 PM 3/7/02 +0000, John Taylor wrote:
>On Thursday 07 March 2002 20:08, Brian wrote:
>> I just upgraded to RedHat 7.2 and I'm having a problem starting the postmaster with the -i argument for tcpip.
>>
>> The /etc/rd.d/init.d/postgresql file has a line in it like this:
>>
>>
>> su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start  > /dev/null 2>&1" < /dev/null
>>
>> if I insert an -i before the -D... or after it... or behind the -p or where ever it fails.
>
>Try:
>
>su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p '/usr/bin/postmaster -i' start  > /dev/null 2>&1" <
/dev/null
>
>Regards
>JohnT


Re: starting the postmaster

From
John Taylor
Date:
On Friday 08 March 2002 01:15, Brian wrote:
> Hi John,
>
> I am getting a FAILED notice on your construction.
>
> if I delete the   >/dev/null 2>&1   I can see:
>
> /usr/bin/pg_ctl: /usr/bin/postmaster -i: No such file or directory
>
> as a response...
>

Hmmm...
That works for me with postgres 7.1, but having looked at the pg_ctl manual page, it probably isn't the
best way to do it.

You probably need to use the -o option to pg_ctl ...
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-i' start  > /dev/null 2>&1" <
/dev/null

Regards
JohnT

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Re: starting the postmaster

From
Brian
Date:
Bingo.... perfect... that works well.
Thank you for helping.


At 08:38 AM 3/8/02 +0000, you wrote:
>On Friday 08 March 2002 01:15, Brian wrote:
>> Hi John,
>>
>> I am getting a FAILED notice on your construction.
>>
>> if I delete the   >/dev/null 2>&1   I can see:
>>
>> /usr/bin/pg_ctl: /usr/bin/postmaster -i: No such file or directory
>>
>> as a response...
>>
>
>Hmmm...
>That works for me with postgres 7.1, but having looked at the pg_ctl manual page, it probably isn't the
>best way to do it.
>
>You probably need to use the -o option to pg_ctl ...
>su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-i' start  > /dev/null 2>&1" <
/dev/null
>
>Regards
>JohnT
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


Re: starting the postmaster

From
John Taylor
Date:
On Friday 08 March 2002 01:15, Brian wrote:
> Hi John,
>
> I am getting a FAILED notice on your construction.
>
> if I delete the   >/dev/null 2>&1   I can see:
>
> /usr/bin/pg_ctl: /usr/bin/postmaster -i: No such file or directory
>
> as a response...
>

Hmmm...
That works for me with postgres 7.1, but having looked at the pg_ctl manual page, it probably isn't the
best way to do it.

You probably need to use the -o option to pg_ctl ...
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-i' start  > /dev/null 2>&1" <
/dev/null

Regards
JohnT

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster