Re: found xmin from before relfrozenxid on pg_catalog.pg_authid - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Date
Msg-id 20180524170853.gmep4arwx7i5m5o3@alvherre.pgsql
Whole thread Raw
In response to Re: found xmin from before relfrozenxid on pg_catalog.pg_authid  (Maxim Boguk <maxim.boguk@gmail.com>)
Responses Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
List pgsql-general
Hmm .. surely

diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 5016181fd7..5d7fa1fb45 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -6690,7 +6690,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple,
     xid = HeapTupleHeaderGetXmin(tuple);
     xmin_frozen = ((xid == FrozenTransactionId) ||
                    HeapTupleHeaderXminFrozen(tuple));
-    if (TransactionIdIsNormal(xid))
+    if (!xmin_frozen && TransactionIdIsNormal(xid))
     {
         if (TransactionIdPrecedes(xid, relfrozenxid))
             ereport(ERROR,


??


-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Paul Jungwirth
Date:
Subject: Performance opportunities for write-only audit tables?
Next
From: Lele Gaifax
Date:
Subject: Re: Parameter placeholders, $n vs ?