[check_postgres] check_hot_standby_delay in 2.18.0

Greg Sabino Mullane greg at endpoint.com
Mon Nov 28 19:36:22 UTC 2011


On Wed, Nov 23, 2011 at 01:19:48PM +0100, Henrik Christian Grove wrote:
> With version 2.16.0 we did:
> check_postgres --action=hot_standby_delay --dbname=bone
> --dbuser=bone_admin --dbhost2=one-db2.local --dbname2=bone
> --dbuser2=bone_admin --showtime=0 --warning=10000
> and it worked nicely (although it felt silly having to specify the
> dbname twice - I don't think measuring hot_standby_delay between
> databases makes much sense).
> 
> With 2.18.0 it fails with:
> Use of uninitialized value $slave in numeric eq (==) at ./check_postgres
> line 4581.

Yes, that's definitely a bug that needs fixing. Seems to me we should only 
require people to provide the bare minimum as well. In your example 
above, it should be just:

 check_postgres --action=hot_standby_delay --dbname=bone
 --dbhost2=one-db2.local --showtime=0 --warning=10000

...
> The check works if I do:
> check_postgres --action=hot_standby_delay --dbhost=localhost
> --dbname=bone --dbuser=bone_admin --dbhost=one-db2.local --showtime=0
> --warning=10000
> except that then connection is made through TCP rather than through the
> UNIX socket. Is there any way to make the local connection through the
> UNIX socket? 

I think fixing the above will provide that as well. If a dbhost is provided, 
it always uses TCP. Although technically you could provide a path to the 
socket, but nobody wants to do that. :)

> P.S. Does any one ever check the bug list? The only thing happening
> seems to be that new bugs are coming in. No one had noted that bug 73 is
> fixed in 2.18.0. 

Things like that can slip through the cracks, but help is always 
appreciated. I'll add a note to the README.dev file to make sure 
to close any fixed bugs.

-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20111128/037b091c/attachment.bin 


More information about the Check_postgres mailing list