mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user