[check_postgres] New action: warm_standby

Guillaume Lelarge guillaume at lelarge.info
Wed Jun 29 08:04:13 UTC 2011


On Wed, 2011-06-29 at 09:50 +0200, david.barbion at adeoservices.com wrote:
> 
> 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...
> >
> Here is my new patch.
> This one takes care of the database cluster state (got from 
> pg_controldata in check_standby_mode()).
> 

Adding a test file for your new action would be a great thing.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com



More information about the Check_postgres mailing list