pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove read_archive_file()'s "count" parameter.
Date: Tue, 24 Mar 2026 16:17:21 +0000
Message-ID: <E1w54RV-001G7p-02@gemulon.postgresql.org> (raw)

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

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(-)



Message-ID: <E1w54RV-001G7p-02@gemulon.postgresql.org>
Permalink:  ../E1w54RV-001G7p-02@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w54RV-001G7p-02@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove read_archive_file()'s "count" parameter.
  In-Reply-To: <E1w54RV-001G7p-02@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox