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

From Heikki Linnakangas
Subject Re: Hot Standby and prepared transactions
Date
Msg-id 4B2A1504.5030602@enterprisedb.com
Whole thread Raw
In response to Re: Hot Standby and prepared transactions  (Hiroyuki Yamada <yamada@kokolink.net>)
Responses Re: Hot Standby and prepared transactions  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Hiroyuki Yamada wrote:
> The implementation assumes that transactions write COMMIT/ABORT WAL at the end
> of them, while it does not seem to write ABORT WAL in immediate shutdown. So,
> 
> 1. acquire ACCESS EXCLUSIVE lock in table A in xact 1
> 2. execute immediate shutdown of the active node
> 3. restart it
> 4. acquire ACCESS EXCLUSIVE lock in table A in xact 2
> 
> ...then, duplicate lock acquisition by two diffrent transactions can occur in the standby node.
> 
> Am I missing something ? Or is this already reported ?

Replay of the shutdown checkpoint that is written when the server is
restarted should abort the old transaction and release its locks.

Hmm, looking at the code, I think Simon threw that baby with the
bathwater when he removed support for starting standby from a shutdown
checkpoint.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Hiroyuki Yamada
Date:
Subject: Re: Hot Standby and prepared transactions
Next
From: Simon Riggs
Date:
Subject: Re: Hot Standby and prepared transactions