Put back code marked "do not remove" to avoid errors on commit and abort records...
authorSimon Riggs <simon@2ndQuadrant.com>
Mon, 5 Oct 2009 19:33:05 +0000 (20:33 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Mon, 5 Oct 2009 19:33:05 +0000 (20:33 +0100)
src/backend/access/transam/xact.c

index 0211d8c28d24fec64dea7b1d67ecb5b38aa38078..7e30234ee7a93eeb808a66ef1f4f8c0dd162a0e7 100644 (file)
@@ -4473,6 +4473,14 @@ xact_redo_commit(xl_xact_commit *xlrec, TransactionId xid,
                        return;
                }
 
+               /*
+                * Record any newly known assigned transactions. This looks
+                * strange to add xids and then immediately remove them, but
+                * we do other important processing here also do don't remove
+                * them (again).
+                */
+               RecordKnownAssignedTransactionIds(max_xid);
+
                /*
                 * Mark the transaction committed in pg_clog. We use async commit
                 * protocol during recovery to provide information on database
@@ -4590,6 +4598,14 @@ xact_redo_abort(xl_xact_abort *xlrec, TransactionId xid)
 
        if (InHotStandby)
        {
+               /*
+                * Record any newly known assigned transactions. This looks
+                * strange to add xids and then immediately remove them, but
+                * we do other important processing here also do don't remove
+                * them (again).
+                */
+               RecordKnownAssignedTransactionIds(max_xid);
+
                /*
                 * We must mark clog before we update the ProcArray.
                 */