diff options
author | Noah Misch | 2025-01-25 19:28:14 +0000 |
---|---|---|
committer | Noah Misch | 2025-01-25 19:28:14 +0000 |
commit | 81772a495ec98d36eabf5cc294e7031a9545c5c1 (patch) | |
tree | 52447ccedb7b25ebbe9372e0c94df8f4b14cf0de /contrib/amcheck | |
parent | 4f6ec3831d3e6a237eb6197451472e70282654db (diff) |
Merge copies of converting an XID to a FullTransactionId.
Assume twophase.c is the performance-sensitive caller, and preserve its
choice of unlikely() branch hint. Add some retrospective rationale for
that choice. Back-patch to v17, for the next commit to use it.
Reviewed (in earlier versions) by Michael Paquier.
Discussion: https://postgr.es/m/17821-dd8c334263399284@postgresql.org
Discussion: https://postgr.es/m/20250116010051.f3.nmisch@google.com
Diffstat (limited to 'contrib/amcheck')
-rw-r--r-- | contrib/amcheck/verify_heapam.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index 8a8e36dde7e..827312306f6 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -1877,7 +1877,9 @@ check_tuple(HeapCheckContext *ctx, bool *xmin_commit_status_ok, /* * Convert a TransactionId into a FullTransactionId using our cached values of * the valid transaction ID range. It is the caller's responsibility to have - * already updated the cached values, if necessary. + * already updated the cached values, if necessary. This is akin to + * FullTransactionIdFromAllowableAt(), but it tolerates corruption in the form + * of an xid before epoch 0. */ static FullTransactionId FullTransactionIdFromXidAndCtx(TransactionId xid, const HeapCheckContext *ctx) |