[check_postgres] New action: warm_standby

david.barbion at adeoservices.com david.barbion at adeoservices.com
Wed Jun 29 06:55:49 UTC 2011


Le 28/06/2011 19:33, Greg Sabino Mullane a écrit :
> On Tue, Jun 28, 2011 at 03:29:05PM +0200, david.barbion at adeoservices.com wrote:
>> Hello,
>>
>> I've created a small patch for check_postgres.pl that adds a new action:
>> warm_standby.
>> This action checks that the process pg_standby is running for the
>> current cluster (depending on the PGPORT env var.).
>> This patch needs the perl module Proc::ProcessTable available at CPAN.
> Thanks! Quick thoughts:
>
> Obviously we'll need a require not a 'use' for the module
> (see for example, the way we handle Date::Parse). I'm not sure about
> the name: we are really checking for a pg_standby process, so
> the "warm_standby" check is indirect.
>
> I'm wondering how this is better than the existing check that scans
> pg_controldata? Also compare with the check_standby_mode() argument...
>
Hi,

Thanks for your reply !
I started to write the warm_standby action from latest stable release 
(2.16.0) which doesn't include check_standby_mode()....

I made some tests with pg_controldata. This one check into postgresql 
data file for current database cluster state ($PGDATA/global/pg_control).
I killed process pg_standby (kill -9), postgresql stopped and 
pg_controldata is still reporting the cluste as "in archive recovery"...

Maybe I could try to combine the check_standby_mode and my function to 
properly determine the current state of the cluster.

About the action name, I will change it to pg_standby.

Best Regards,
David.


Ce message et toutes les pièces jointes sont établis à l'attention exclusive de leurs destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. L'internet ne permettant pas d'assurer l'intégrité de ce message, le contenu de ce message ne représente en aucun cas un engagement de la part de Adeo Services.


More information about the Check_postgres mailing list