Remove read_archive_file()'s "count" parameter.
Tom Lane <tgl@sss.pgh.pa.us>
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/3341199.1774221191@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_waldump/archive_waldump.c | modified | +9 −18 |
| src/bin/pg_waldump/pg_waldump.h | modified | +0 −3 |
Discussion
- pg_waldump: support decoding of WAL inside tarfile 126 messages · 2025-08-07 → 2026-04-15