check_postgres
check_postgres copied to clipboard
action=sequence returns an error with two databases with the same sequences
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.
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.
Hi, i have posted a workaround here: https://github.com/bucardo/check_postgres/issues/155#issuecomment-470848304