Improve error messages for some callers of XLogReadRecord()
authorMichael Paquier <[email protected]>
Wed, 10 Nov 2021 03:00:33 +0000 (12:00 +0900)
committerMichael Paquier <[email protected]>
Wed, 10 Nov 2021 03:00:33 +0000 (12:00 +0900)
commitc9c401a5e13accc4a3a775e3feeabdc5940c9178
treec616ef270413dfa847f4e97483f23ef4c694e14f
parent4168a4745492cd54a0ffffc271b452525ef4dc60
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]
src/backend/replication/logical/logical.c
src/backend/replication/logical/logicalfuncs.c
src/backend/replication/slotfuncs.c
src/backend/replication/walsender.c