diff options
| author | Michael Paquier | 2021-11-10 03:00:33 +0000 |
|---|---|---|
| committer | Michael Paquier | 2021-11-10 03:00:33 +0000 |
| commit | c9c401a5e13accc4a3a775e3feeabdc5940c9178 (patch) | |
| tree | c616ef270413dfa847f4e97483f23ef4c694e14f /src/backend/replication/walsender.c | |
| parent | 4168a4745492cd54a0ffffc271b452525ef4dc60 (diff) | |
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]
Diffstat (limited to 'src/backend/replication/walsender.c')
| -rw-r--r-- | src/backend/replication/walsender.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index fff7dfc6409..7950afb173c 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -2979,7 +2979,8 @@ XLogSendLogical(void) /* xlog record was invalid */ if (errm != NULL) - elog(ERROR, "%s", errm); + elog(ERROR, "could not find record while sending logically-decoded data: %s", + errm); if (record != NULL) { |
