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

From: Jonah Kuo <jonahk(at)mail(dot)lbfe(dot)org(dot)tw>
To: pgsql-admin <pgsql-admin(at)postgreSQL(dot)org>
Subject: I got the answer!! -- Re: [ADMIN] pgsql.sh
Date: 1998-11-24 10:05:27
Message-ID: 365A84E7.6889E39C@mail.lbfe.org.tw
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Antonio Garcia Mari 1998-11-24 18:43:33 Installing 6.3.2 and 6.4 in the same machine
Previous Message Matthew Hixson 1998-11-24 07:26:26 Re: [ADMIN] pgsql.sh