pgsql: Improve error messages for some callers of XLogReadRecord()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve error messages for some callers of XLogReadRecord()
Date: 2021-11-10 03:12:26
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve error messages for some callers of XLogReadRecord()

A couple of code paths related to logical decoding (WAL sender, slot
advancing, etc.) use XLogReadRecord(), feeding on error messages
generated by walreader.c on a failure. All those messages have no
context, making it harder to spot from where an error could come even if
these should not happen. All the other callers of XLogReadRecord() do
that already.

Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c9c401a5e13accc4a3a775e3feeabdc5940c9178

Modified Files
--------------
src/backend/replication/logical/logical.c | 4 ++--
src/backend/replication/logical/logicalfuncs.c | 2 +-
src/backend/replication/slotfuncs.c | 3 ++-
src/backend/replication/walsender.c | 3 ++-
4 files changed, 7 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2021-11-10 07:26:18 pgsql: Fix incorrect format placeholders
Previous Message Jeff Davis 2021-11-10 01:01:23 pgsql: Add pg_checkpointer predefined role for CHECKPOINT command.