mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Add error codes to some corruption log messages
In some cases we have elog(ERROR) while corruption is certain and we can give a clear error code ERRCODE_DATA_CORRUPTED or ERRCODE_INDEX_CORRUPTED. Author: Andrey Borodin <x4mmm@yandex-team.ru> Discussion: https://www.postgresql.org/message-id/flat/25F6C686-6442-4A6B-BAF8-A6F7B84B16DE@yandex-team.ru
This commit is contained in:
@ -423,7 +423,9 @@ tuple_lock_retry:
|
||||
|
||||
/* otherwise xmin should not be dirty... */
|
||||
if (TransactionIdIsValid(SnapshotDirty.xmin))
|
||||
elog(ERROR, "t_xmin is uncommitted in tuple to be updated");
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATA_CORRUPTED),
|
||||
errmsg_internal("t_xmin is uncommitted in tuple to be updated")));
|
||||
|
||||
/*
|
||||
* If tuple is being updated by other transaction then we
|
||||
|
Reference in New Issue
Block a user