diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-11-10 12:00:33 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-11-10 12:00:33 +0900 |
commit | c9c401a5e13accc4a3a775e3feeabdc5940c9178 (patch) | |
tree | c616ef270413dfa847f4e97483f23ef4c694e14f /src/backend/replication/logical/logicalfuncs.c | |
parent | 4168a4745492cd54a0ffffc271b452525ef4dc60 (diff) | |
download | postgresql-c9c401a5e13accc4a3a775e3feeabdc5940c9178.tar.gz postgresql-c9c401a5e13accc4a3a775e3feeabdc5940c9178.zip |
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/YYnTH6OyOwQcAdkw@paquier.xyz
Diffstat (limited to 'src/backend/replication/logical/logicalfuncs.c')
-rw-r--r-- | src/backend/replication/logical/logicalfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index 2609a0a7104..6cd2279a2e3 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -276,7 +276,7 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin record = XLogReadRecord(ctx->reader, &errm); if (errm) - elog(ERROR, "%s", errm); + elog(ERROR, "could not find record for logical decoding: %s", errm); /* * The {begin_txn,change,commit_txn}_wrapper callbacks above will |