Re: SSI atomic commit - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SSI atomic commit
Date
Msg-id 2648.1310071735@sss.pgh.pa.us
Whole thread Raw
In response to Re: SSI atomic commit  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: SSI atomic commit
Re: SSI atomic commit
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Kevin and Dan also pointed out that a 2PC transaction can stay in 
> prepared state for a long time, and we could optimize that by setting 
> prepareSeqNo only at the final COMMIT PREPARED. I objected to that, for 
> the reason that it's currently very convenient for testing purposes that 
> a transaction prepared with PREPARE TRANSACTION is in the exact same 
> state as regular transaction that's going through regular commit processing.

Seems to me there's a more fundamental reason not to do that, which is
that once you've done PREPARE it is no longer legitimate to decide to
roll back the transaction to get out of a "dangerous" structure --- ie,
you have to target one of the other xacts involved instead.  Shouldn't
the assignment of a prepareSeqNo correspond to the point where the xact
is no longer a target for SSI rollback?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SSI atomic commit
Next
From: Peter Eisentraut
Date:
Subject: -Wformat-zero-length