diff --git a/src/test/recovery/t/031_recovery_conflict.pl b/src/test/recovery/t/031_recovery_conflict.pl index 7a740f69806..c87acd20e0a 100644 --- a/src/test/recovery/t/031_recovery_conflict.pl +++ b/src/test/recovery/t/031_recovery_conflict.pl @@ -325,9 +325,10 @@ sub check_conflict_log sub check_conflict_stat { my $conflict_type = shift; - my $count = $node_standby->safe_psql($test_db, - qq[SELECT confl_$conflict_type FROM pg_stat_database_conflicts WHERE datname='$test_db';] - ); - is($count, 1, "$sect: stats show conflict on standby"); + ok( $node_standby->poll_query_until( + $test_db, + qq[SELECT confl_$conflict_type FROM pg_stat_database_conflicts WHERE datname='$test_db';], + '1'), + "$sect: stats show conflict on standby"); }