Skip to content

Commit f57079c

Browse files
author
Josh Williams
committed
Remove host reordering in hot_standby_delay check
This was resulting in the master queries being sent to the replica and vice versa, if the replica is listed first. Will probably still want to reorder the hosts in output (or just list them all) later. Thanks to Jacobo Blasco for debug assistance.
1 parent 2cdc75c commit f57079c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

check_postgres.pl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4763,14 +4763,6 @@ sub check_hot_standby_delay {
47634763
$slave = 2;
47644764
}
47654765

4766-
## If the slave is "db1" and master "db2", go ahead and switch them around for clearer output
4767-
if (1 == $slave) {
4768-
($slave, $master) = (2, 1);
4769-
for my $k (qw(host port dbname dbuser dbpass)) {
4770-
($opt{$k}, $opt{$k . 2}) = ($opt{$k . 2}, $opt{$k}); ## no critic (ProhibitMismatchedOperators)
4771-
}
4772-
}
4773-
47744766
## Get xlog positions
47754767
my ($moffset, $s_rec_offset, $s_rep_offset);
47764768

0 commit comments

Comments
 (0)