]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Remove read_archive_file()'s "count" parameter.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 24 Mar 2026 16:06:08 +0000 (12:06 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 24 Mar 2026 16:17:12 +0000 (12:17 -0400)
commitca1f1ade3f64f53c5319ee2c7db71a669a38cc83
treed118a819b29544bbc2ee1ead3f8029aeca5f9f1b
parent2102ebb1953fe656a46819e11ff4204e2f918dda
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
src/bin/pg_waldump/archive_waldump.c
src/bin/pg_waldump/pg_waldump.h