diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-02-12 17:58:25 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-02-12 17:58:25 +0900 |
commit | 0fc68c8421b656f2ad03e788d97ff0c59da60e6f (patch) | |
tree | 337c555eeb6acf85ffb0c2732ed87f6f9d887cea | |
parent | 5b94e2753439b699b78aacbb53e89bf0e814becc (diff) | |
download | postgresql-0fc68c8421b656f2ad03e788d97ff0c59da60e6f.tar.gz postgresql-0fc68c8421b656f2ad03e788d97ff0c59da60e6f.zip |
Fix issue in recovery test 041_checkpoint_at_promote
The phase of the test waiting for a restartpoint to complete was not
working as intended, due to a log_contains() call incorrectly
written.
The problem reported by the author could be simply reproduced by
removing the injection_points_wakeup() call: the test succeeds rather
than waiting for the restartpoint completion. In most cases, the
restartpoint completion is fast enough that the test offered the wanted
coverage. On slow machines, it could have become unreliable.
Oversight in 6782709df81f.
Author: Nitin Jadhav
Discussion: https://postgr.es/m/CAMm1aWa_6u+o52r7h7G6pX-oWD0Qraf0ee17Ma50qxGS0B_Rzg@mail.gmail.com
Backpatch-through: 17
-rw-r--r-- | src/test/recovery/t/041_checkpoint_at_promote.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/recovery/t/041_checkpoint_at_promote.pl b/src/test/recovery/t/041_checkpoint_at_promote.pl index cb301d01427..cc5aa80af40 100644 --- a/src/test/recovery/t/041_checkpoint_at_promote.pl +++ b/src/test/recovery/t/041_checkpoint_at_promote.pl @@ -110,7 +110,7 @@ $node_standby->safe_psql('postgres', my $checkpoint_complete = 0; foreach my $i (0 .. 10 * $PostgreSQL::Test::Utils::timeout_default) { - if ($node_standby->log_contains("restartpoint complete"), $logstart) + if ($node_standby->log_contains("restartpoint complete", $logstart)) { $checkpoint_complete = 1; last; |