Re: Hot Standby and prepared transactions - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot Standby and prepared transactions
Date
Msg-id 1261057107.634.3289.camel@ebony
Whole thread Raw
In response to Re: Hot Standby and prepared transactions  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Hot Standby and prepared transactions  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Thu, 2009-12-17 at 15:18 +0200, Heikki Linnakangas wrote:

> That removed piece of code was executed in the standby whenever we saw a
> shutdown checkpoint. It calls ProcArrayApplyRecoveryInfo(), which calls
> ExpireOldKnownAssignedTransactionIds() and StandbyReleaseOldLocks() to
> clean up known-assigned-xid entries and locks of the implicitly-aborted
> transactions.

OK, I was presuming that running StandbyRecoverPreparedTransactions()
and ProcArrayInitRecoveryInfo() twice would cause problems.

> I see now that in the presence of prepared transactions, we would fail
> to clean up failed transations with XID > the oldest prepared
> transaction

Good! I just spotted that also, just prior to posting my fix, so
rewriting it again now.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Update on true serializable techniques in MVCC
Next
From: "Kevin Grittner"
Date:
Subject: Re: Update on true serializable techniques in MVCC