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

Поиск
Список
Период
Сортировка
От Jonah Kuo
Тема I got the answer!! -- Re: [ADMIN] pgsql.sh
Дата
Msg-id 365A84E7.6889E39C@mail.lbfe.org.tw
обсуждение исходный текст
Ответ на Re: [ADMIN] pgsql.sh  (Matthew Hixson <hixson@frozenwave.com>)
Список 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 по дате отправления:

Предыдущее
От: Matthew Hixson
Дата:
Сообщение: Re: [ADMIN] pgsql.sh
Следующее
От: "Antonio Garcia Mari"
Дата:
Сообщение: Installing 6.3.2 and 6.4 in the same machine