Re: HOT chain validation in verify_heapam()
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org, Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, Aleksander Alekseev <aleksander@timescale.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-21T22:06:32Z
Lists: pgsql-hackers
On Mon, Nov 21, 2022 at 1:34 PM Andres Freund <andres@anarazel.de> wrote: > Hm. But to get to that point we already need to have decided that xmax > is not a normal xid. Unhelpfully we reuse the 'xid' variable for xmax as > well: > xid = HeapTupleHeaderGetRawXmax(tuple); > > I don't really know the HEAP_XMAX_INVALID branch is trying to do. For > one, xid already is set to HeapTupleHeaderGetRawXmax(), why is it > refetching the value? Right, that detail is correct, but still weird. And suggests that it might not have been super well thought through. > So it looks to me like this path should just test !TransactionIdIsValid(xid)? Agreed. Plus there should be a comment that reminds you that this is a normal regular transaction ID (easy to miss, because the initial "if" block for Multis is rather large). I will push something like that soon. -- Peter Geoghegan
Commits
-
amcheck: Generalize one of the recently-added update chain checks.
- c87aff065c33 16.0 landed
-
amcheck: Tighten up validation of redirect line pointers.
- 80d5e3a61551 16.0 landed
-
amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.
- 8fd5aa76c367 14.8 landed
- 701ec5557968 15.3 landed
- e88754a1965c 16.0 landed
-
amcheck: Fix a few bugs in new update chain validation.
- 949e2e7c4f68 16.0 landed
-
Fix new test case to work on (some?) big-endian architectures.
- c75a623304bc 16.0 landed
-
Don't test HEAP_XMAX_INVALID when freezing xmax.
- 02d647bbf057 16.0 landed