mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +03:00
Minor test fixes in 035_standby_logical_decoding.pl
Import usleep, which, due to an oversight in oversight in commit
48796a98d5
was used but not imported.
Correct the comparison string used in two logfile checks. Previously, it
was incorrect and thus the test could never have failed.
Also wordsmith a comment to make it clear when hot_standby_feedback is
meant to be on during the test scenarios.
Reported-by: Melanie Plageman <melanieplageman@gmail.com>
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/flat/CAAKRu_YO2mEm%3DZWZKPjTMU%3DgW5Y83_KMi_1cr51JwavH0ctd7w%40mail.gmail.com
Backpatch-through: 16
This commit is contained in:
@@ -8,6 +8,7 @@ use warnings FATAL => 'all';
|
|||||||
|
|
||||||
use PostgreSQL::Test::Cluster;
|
use PostgreSQL::Test::Cluster;
|
||||||
use PostgreSQL::Test::Utils;
|
use PostgreSQL::Test::Utils;
|
||||||
|
use Time::HiRes qw(usleep);
|
||||||
use Test::More;
|
use Test::More;
|
||||||
|
|
||||||
if ($ENV{enable_injection_points} ne 'yes')
|
if ($ENV{enable_injection_points} ne 'yes')
|
||||||
@@ -623,7 +624,7 @@ ok( $stderr =~
|
|||||||
/ERROR: cannot copy invalidated replication slot "vacuum_full_inactiveslot"/,
|
/ERROR: cannot copy invalidated replication slot "vacuum_full_inactiveslot"/,
|
||||||
"invalidated slot cannot be copied");
|
"invalidated slot cannot be copied");
|
||||||
|
|
||||||
# Turn hot_standby_feedback back on
|
# Set hot_standby_feedback to on
|
||||||
change_hot_standby_feedback_and_wait_for_xmins(1, 1);
|
change_hot_standby_feedback_and_wait_for_xmins(1, 1);
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
@@ -754,12 +755,12 @@ wait_until_vacuum_can_remove(
|
|||||||
|
|
||||||
# message should not be issued
|
# message should not be issued
|
||||||
ok( !$node_standby->log_contains(
|
ok( !$node_standby->log_contains(
|
||||||
"invalidating obsolete slot \"no_conflict_inactiveslot\"", $logstart),
|
"invalidating obsolete replication slot \"no_conflict_inactiveslot\"", $logstart),
|
||||||
'inactiveslot slot invalidation is not logged with vacuum on conflict_test'
|
'inactiveslot slot invalidation is not logged with vacuum on conflict_test'
|
||||||
);
|
);
|
||||||
|
|
||||||
ok( !$node_standby->log_contains(
|
ok( !$node_standby->log_contains(
|
||||||
"invalidating obsolete slot \"no_conflict_activeslot\"", $logstart),
|
"invalidating obsolete replication slot \"no_conflict_activeslot\"", $logstart),
|
||||||
'activeslot slot invalidation is not logged with vacuum on conflict_test'
|
'activeslot slot invalidation is not logged with vacuum on conflict_test'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user