amcheck: In verify_heapam, allows tuples with xmin 0.

Commit e88754a196 caused that case
to be reported as corruption, but Peter Geoghegan pointed out that
it can legitimately happen in the case of a speculative insertion
that aborts, so we'd better not flag it as corruption after all.

Back-patch to v14, like the commit that introduced the issue.

Discussion: http://postgr.es/m/CAH2-WzmEabzcPTxSY-NXKH6Qt3FkAPYHGQSe2PtvGgj17ZQkCw@mail.gmail.com
This commit is contained in:
Robert Haas 2023-03-28 16:16:53 -04:00
parent bf5c4b3d9d
commit 453f53821f
1 changed files with 1 additions and 2 deletions

View File

@ -739,8 +739,7 @@ check_tuple_visibility(HeapCheckContext *ctx)
switch (get_xid_status(xmin, ctx, &xmin_status))
{
case XID_INVALID:
report_corruption(ctx,
pstrdup("xmin is invalid"));
/* Could be the result of a speculative insertion that aborted. */
return false;
case XID_BOUNDS_OK:
break;