postgres.git / summary / log / commit / refs

commit    3dea7af519fd2b6e098c4261cb91d318cf31a8d4
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Wed Feb 12 08:58:29 2025 +0000
First released in: 18.0, 17.4

    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


src/test/recovery/t/041_checkpoint_at_promote.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/recovery/t/041_checkpoint_at_promote.pl b/src/test/recovery/t/041_checkpoint_at_promote.pl index 905662353da..e90311ad6cb 100644 --- a/src/test/recovery/t/041_checkpoint_at_promote.pl +++ b/src/test/recovery/t/041_checkpoint_at_promote.pl @@ -113,7 +113,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; [parent: ff6d9cfcb17e]