Search Postgresql Archives

Re: postgresql start/stop/status script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Eisentraut <peter_e@xxxxxxx> writes:
> 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 think the question stands though: why doesn't pg_ctl check that the
PID in the lockfile corresponds to a live process?  A quick kill(pid,0)
would raise the robustness of the status check quite a lot, and now that
the code is in C it's a trivial addition.

Unless someone sees a reason not to do this, I will throw the change
into current and 8.0 branches.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux