Alvaro Herrera wrote: > Peter Geoghegan wrote: > > > I thought that we no longer store FrozenTransactionId (xid 2) as our > > "raw" xmin while freezing, and yet that's what we see here. > > I'm doing this in 9.3. I can't tell if the new tuple freezing stuff > broke things more thoroughly, but it is already broken in earlier > releases.
In fact, I think in 9.3 we should include this patch, to set the Xmin to FrozenXid. 9.4 and onwards have commit 37484ad2a "Change the way we mark tuples as frozen" which uses a combination of infomask bits, but in 9.3 I think leaving the unfrozen value in the xmax field is a bad idea even if we set the HEAP_XMAX_COMMITTED bit. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index e00dc6c1ca..e68746fc3b 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -5500,7 +5500,10 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask, if (TransactionIdPrecedes(xid, cutoff_xid)) { if (TransactionIdDidCommit(xid)) + { + xid = FrozenTransactionId; *flags = FRM_MARK_COMMITTED | FRM_RETURN_IS_XID; + } else { *flags |= FRM_INVALIDATE_XMAX;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers