Re: postgresql start/stop/status script

Поиск
Список
Период
Сортировка
От Baldur Norddahl
Тема Re: postgresql start/stop/status script
Дата
Msg-id 42661C8A.6090906@clansoft.dk
обсуждение исходный текст
Ответ на Re: postgresql start/stop/status script  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
Peter Eisentraut wrote:
Baldur Norddahl wrote: 
Is there a better way to query the status of postgresql? I would
expect it to at least check that the process in the PID is actually
running and that it is a postgresql process.   
Maybe try

test $(readlink /proc/$pid/exe) = /usr/bin/postgres 

I have now changed my script to use this instead:

        if pgrep -U pg0 'postmaster' > /dev/null
        then
                echo running
        else
                echo stopped
        fi

I would still hold that "pg_ctl status" is broken though.

Baldur

В списке pgsql-general по дате отправления:

Предыдущее
От: Alexandre
Дата:
Сообщение: Re: Simplified (a-la [G|N]DBM) DB access
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: reorder table data