From: Ola Sandbu <ola.sandbu@usit.uio.no>
To: Nicola Mauri <Nicola.Mauri@saga.it>
To: pgsql-admin@postgresql.org
Subject: Re: Init script for multiple postmasters
Date: Mon, 22 May 2006 15:30:24 +0200
Message-ID: <4471BCF0.6050203@usit.uio.no> (raw)
In-Reply-To: <20060522123345.GB8586@surnet.cl>
References: <OF834510B3.4C033594-ONC1257176.00379DD0-C1257176.003DE59E@saga.it>
<20060522123345.GB8586@surnet.cl>
On 05/22/2006 02:33 PM, Alvaro Herrera wrote:
> Nicola Mauri wrote:
>
>> In this scenario the cluster manager cannot determine wether a single
>> instance is running or down.
>> I'm going to modify initscripts and use a differente approach to probe
>> postmasters status, but I'm not sure if this is good:
>>
>> ps ax | grep postmaster | grep /var/lib/pgsql2/data2
>> ps ax | grep postmaster | grep /var/lib/pgsql/data
>>
>> What would you suggest?
>
> pg_ctl -d /var/lib/pgsql2/data2 status
>
My experience is that you can not know if the database is running or has
died by only checking the status flag. But if you combines these two, by
checking the PID process ID from the pg_ctl command and then use 'ps
-ax' to see that this process is really alive, then you have a proof.
rgds Ola Sandbu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: ola.sandbu@usit.uio.no, Nicola.Mauri@saga.it
Subject: Re: Init script for multiple postmasters
In-Reply-To: <4471BCF0.6050203@usit.uio.no>
References: <OF834510B3.4C033594-ONC1257176.00379DD0-C1257176.003DE59E@saga.it> <20060522123345.GB8586@surnet.cl> <4471BCF0.6050203@usit.uio.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox