I got the answer!! -- Re: [ADMIN] pgsql.sh - Mailing list pgsql-admin

From Jonah Kuo
Subject I got the answer!! -- Re: [ADMIN] pgsql.sh
Date
Msg-id 365A84E7.6889E39C@mail.lbfe.org.tw
Whole thread Raw
In response to Re: [ADMIN] pgsql.sh  (Matthew Hixson <hixson@frozenwave.com>)
List pgsql-admin
Matthew Hixson wrote:

> I think this might be part of the problem:  from 'man postmaster'
>
> " -S Specifies that the postmaster process should start up in silent mode.
> That is, it will
>             disassociate from the user's (controlling) tty and start its
> own process group.  This
>             should not be used in combination with debugging options
> because any messages printed
>             to standard output and standard error are discarded."
>
> Another problem could be that the -o option means that the rest of the
> line should be sent to the backend as commandline arguments, so it might
> not be grabbing the ouput from postmaster at all.
>   Here's my startup script:
>
> echo "postmaster -B 256 >/home/postgres/pm.log 2>&1 &" | su - postgres
>
> This is on my Slackware system.
>
>   -M@
>

Here is my new pgsql.sh, you can see the differences between the new one and
oringinal one.

#!/bin/sh
[ -x /tmp/.s.PGSQL.* ] && rm -f /tmp/.s.PGSQL.*
[ -x /usr/local/pgsql/bin/postmaster ] && \
        su -l postgres -c 'exec \
    /usr/local/pgsql/bin/postmaster \
    -D/usr/local/pgsql/data \
    -o -F > /usr/local/pgsql/errlog 2>&1' & \
    echo -n ' pgSQL' &

Thanks all folks who gave me the light.


Jonah






pgsql-admin by date:

Previous
From: Matthew Hixson
Date:
Subject: Re: [ADMIN] pgsql.sh
Next
From: "Antonio Garcia Mari"
Date:
Subject: Installing 6.3.2 and 6.4 in the same machine