pgsql: Fix WAL file selection in 013_rewind test - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Fix WAL file selection in 013_rewind test
Date
Msg-id E1xBDbG-00000001d1F-1M71@gemulon.postgresql.org
Whole thread
List pgsql-committers
Fix WAL file selection in 013_rewind test

Without an explicit WAL filename, pg_waldump determines the segment
size from the first WAL-named directory entry.  A preallocated
segment with an uninitialized header can make this fail before the
checkpoint is read.

Pass the WAL filename recorded in backup_label to avoid depending
on directory enumeration order.  Use command_like() so command
failures and stderr are checked rather than appearing only as an
empty-output mismatch.

This was independently reported by Nazir Bilal Yavuz and Alexander
Lakhin.

Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reported-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAN55FZ1Yak_xBqMaDQsD7atpBkGLEkF-DKXcs3nLHM1Uq4YRew%40mail.gmail.com
Discussion: https://postgr.es/m/ffd837c5-dc22-4db1-a2d8-b623cbe9b30c@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a5447a2deaca65c69f1838240f6bdb3ff85c9577

Modified Files
--------------
src/test/modules/test_checksums/t/013_rewind.pl | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Álvaro Herrera
Date:
Subject: pgsql: Turn "check" into assertion
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG