Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit961dd75

Browse files
committed
Report tuple address in data-corruption error message
Most data-corruption reports mention the location of the problem, butthis one failed to. Add it.Backpatch all the way back. In 12 and older, also assign theERRCODE_DATA_CORRUPTED error code as was done in commitfd6ec93 for13 and later.Discussion:https://postgr.es/m/202108191637.oqyzrdtnheir@alvherre.pgsql
1 parenta397109 commit961dd75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/access/heap/heapam_handler.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,11 @@ heapam_tuple_lock(Relation relation, ItemPointer tid, Snapshot snapshot,
424424
if (TransactionIdIsValid(SnapshotDirty.xmin))
425425
ereport(ERROR,
426426
(errcode(ERRCODE_DATA_CORRUPTED),
427-
errmsg_internal("t_xmin is uncommitted in tuple to be updated")));
427+
errmsg_internal("t_xmin %u is uncommitted in tuple (%u,%u) to be updated in table \"%s\"",
428+
SnapshotDirty.xmin,
429+
ItemPointerGetBlockNumber(&tuple->t_self),
430+
ItemPointerGetOffsetNumber(&tuple->t_self),
431+
RelationGetRelationName(relation))));
428432

429433
/*
430434
* If tuple is being updated by other transaction then we

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp