postgres.git / summary / log / commit / refs

commit    a244e17077301ec3c32d0eaf6f8d72b0132791fb
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Wed Jan 14 07:02:36 2026 +0000
First released in: 16.12, 17.8, 18.2

    pg_waldump: Relax LSN comparison check in TAP test
    
    The test 002_save_fullpage.pl, checking --save-fullpage fails with
    wal_consistency_checking enabled, due to the fact that the block saved
    in the file has the same LSN as the LSN used in the file name.  The test
    required that the block LSN is stritly lower than file LSN.  This commit
    relaxes the check a bit, by allowing the LSNs to match.
    
    While on it, the test name is reworded to include some information about
    the file and block LSNs, which is useful for debugging.
    
    Author: Andrey Borodin <x4mmm@yandex-team.ru>
    Discussion: https://postgr.es/m/4226AED7-E38F-419B-AAED-9BC853FB55DE@yandex-team.ru
    Backpatch-through: 16


src/bin/pg_waldump/t/002_save_fullpage.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_waldump/t/002_save_fullpage.pl b/src/bin/pg_waldump/t/002_save_fullpage.pl index 1f398b043a9..01713e26ac9 100644 --- a/src/bin/pg_waldump/t/002_save_fullpage.pl +++ b/src/bin/pg_waldump/t/002_save_fullpage.pl @@ -104,8 +104,9 @@ for my $fullpath (glob "$tmp_folder/raw/*") my ($hi_lsn_bk, $lo_lsn_bk) = get_block_lsn($fullpath, $blocksize); # The LSN on the block comes before the file's LSN. - ok( $hi_lsn_fn . $lo_lsn_fn gt $hi_lsn_bk . $lo_lsn_bk, - 'LSN stored in the file precedes the one stored in the block'); + ok( $hi_lsn_fn . $lo_lsn_fn ge $hi_lsn_bk . $lo_lsn_bk, + "LSN stored in the file $hi_lsn_fn/$lo_lsn_fn precedes the one stored in the block $hi_lsn_bk/$lo_lsn_bk" + ); } ok($file_count > 0, 'verify that at least one block has been saved'); [parent: 930a0508a08f]