Content-Length: 271461 | pFad | http://github.com/postgrespro/postgres/commit/5766228bc64268369b59b07cffa7d31cd4f9c9ff

D1 Fix Xmax freeze conditions · postgrespro/postgres@5766228 · GitHub
Skip to content

Commit 5766228

Browse files
committed
Fix Xmax freeze conditions
I broke this in 0ac5ad5; previously, freezing a tuple marked with an IS_MULTI xmax was not necessary. Per brokenness report from Jeff Janes.
1 parent 335c5e9 commit 5766228

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/access/heap/heapam.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5113,10 +5113,11 @@ heap_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
51135113
* cutoff; it doesn't remove dead members of a very old multixact.
51145114
*/
51155115
xid = HeapTupleHeaderGetRawXmax(tuple);
5116-
if (TransactionIdIsNormal(xid) &&
5117-
(((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
5118-
TransactionIdPrecedes(xid, cutoff_xid))) ||
5119-
MultiXactIdPrecedes(xid, cutoff_multi)))
5116+
if ((tuple->t_infomask & HEAP_XMAX_IS_MULTI) ?
5117+
(MultiXactIdIsValid(xid) &&
5118+
MultiXactIdPrecedes(xid, cutoff_multi)) :
5119+
(TransactionIdIsNormal(xid) &&
5120+
TransactionIdPrecedes(xid, cutoff_xid)))
51205121
{
51215122
HeapTupleHeaderSetXmax(tuple, InvalidTransactionId);
51225123

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/5766228bc64268369b59b07cffa7d31cd4f9c9ff

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy