From d8da369ccabc5de4db927b313a78c1da71215ae9 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Mon, 5 Oct 2009 20:33:05 +0100 Subject: [PATCH] Put back code marked "do not remove" to avoid errors on commit and abort records that haven't previously notified recovery of their xids. Strangely this is the second time I've put that code back, hence the previous "do not remove" comment. --- src/backend/access/transam/xact.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 0211d8c28d..7e30234ee7 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -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. */ -- 2.39.5