diff options
author | Greg Sabino Mullane | 2011-05-23 16:47:06 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2011-05-23 16:47:06 +0000 |
commit | 772e139bfea9d9fa891a60f3b5ca98a19e93bb9d (patch) | |
tree | f6a6037f2f65e27c4d7dfd8d5defd6b63659626b /check_postgres.pl | |
parent | 69ad9d6039172e1ccf46b6320c9d5e960daebad5 (diff) |
Swap db1 and db2 if the slave is 1 for the hot standby check (David E. Wheeler)
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 41c99bc9d..bda7d5762 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -4035,6 +4035,14 @@ sub check_hot_standby_delay { return; } + ## If the slave is "db1" and master "db2", go ahead and switch them around for clearer output + if (1 == $slave == 1) { + ($slave, $master) = (2, 1); + for my $k (qw(host port dbname dbuser dbpass)) { + ($opt{$k}, $opt{$k . 2}) = ($opt{$k . 2}, $opt{$k}); + } + } + ## Get xlog positions my ($moffset, $s_rec_offset, $s_rep_offset); ## On master @@ -9291,6 +9299,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B<Version 2.18.0> + + Swap db1 and db2 if the slave is 1 for the hot standby check (David E. Wheeler) + =item B<Version 2.17.0> Give detailed information and refactor txn_idle, txn_time, and query_time |