check_postgres icon indicating copy to clipboard operation
check_postgres copied to clipboard

action=sequence returns an error with two databases with the same sequences

Open phinjensen opened this issue 12 years ago • 2 comments

ID: 115 Version: 2.19.0 Date: 2012-10-30 03:21 EDT Author: [email protected]


I have multiple databases with the same schema including same sequences. I want to check their sequences with --action=sequence.

check_postgres.pl -H 10.1.30.5 --action=sequence -db=staging,production
--critical=95%

ERROR: FEHLER:  Relation »public.customer_addresses_id_seq« existiert nicht
LINE 7: FROM public.customer_addresses_id_seq) foo

When I am doing this with single commands like ...

check_postgres.pl -H 10.1.30.5 --action=sequence -db=staging --critical=95%
check_postgres.pl -H 10.1.30.5 --action=sequence -db=production --critical=95%

... everything goes well.

Seems to be a bug.

phinjensen avatar Jun 24 '13 17:06 phinjensen

Author: Greg Sabino Mullane ([email protected]) Date: 2013-02-08 23:46:03 EST


Definitely a bug! Looks like run_command is using that global $db a bit too much, as we now can nest calls to that function.

phinjensen avatar Jun 24 '13 17:06 phinjensen

Hi, i have posted a workaround here: https://github.com/bucardo/check_postgres/issues/155#issuecomment-470848304

eizedev avatar Mar 08 '19 08:03 eizedev