Re: Hot Standby and prepared transactions
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Hiroyuki Yamada <yamada@kokolink.net>, pgsql-hackers@postgresql.org
Date: 2009-12-17T13:38:27Z
Lists: 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