pg_waldump: Fix error message for WAL files smaller than XLOG_BLCKSZ. When opening a WAL file smaller than XLOG_BLCKSZ (e.g. 0 bytes long) while determining the wal_segment_size, pg_waldump checked errno, despite errno not being set by the short read. Resulting in a bogus error message.
Author: Kyotaro Horiguchi <horikyota....@gmail.com> Discussion: https://postgr.es/m/20220214.181847.775024684568733277.horikyota....@gmail.com Backpatch: 11-, the bug was introducedin fc49e24fa Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cd83cb953606b94966981056e79dbb6c48751055 Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)