Remove read_archive_file()'s "count" parameter. Instead, always try to fill the allocated buffer completely. The previous coding apparently intended (though it's undocumented) to read only small amounts of data until we are able to identify the WAL segment size and begin filtering out unwanted segments. However this extra complication has no measurable value according to simple testing here, and it could easily be a net loss if there is a substantial amount of non-WAL data in the archive file before the first WAL file.
Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ca1f1ade3f64f53c5319ee2c7db71a669a38cc83 Modified Files -------------- src/bin/pg_waldump/archive_waldump.c | 27 +++++++++------------------ src/bin/pg_waldump/pg_waldump.h | 3 --- 2 files changed, 9 insertions(+), 21 deletions(-)
