Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B5329B5DBF4 for ; Thu, 7 Jul 2011 18:03:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 36296-02 for ; Thu, 7 Jul 2011 21:03:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from midnight-anchovy.ambulatoryclam.net (unknown [18.141.0.210]) by mail.postgresql.org (Postfix) with ESMTP id C5D18B5DBF0 for ; Thu, 7 Jul 2011 18:03:38 -0300 (ADT) Received: by midnight-anchovy.ambulatoryclam.net (Postfix, from userid 1001) id 7848A4AE01; Thu, 7 Jul 2011 17:08:07 -0400 (EDT) Date: Thu, 7 Jul 2011 17:08:07 -0400 From: Dan Ports To: Tom Lane Cc: Heikki Linnakangas , Kevin Grittner , pgsql-hackers@postgresql.org Subject: Re: SSI atomic commit Message-ID: <20110707210807.GE76634@csail.mit.edu> References: <4E12FDA8020000250003EFC1@gw.wicourts.gov> <4E15D48A.7080203@enterprisedb.com> <4E159B5C020000250003F063@gw.wicourts.gov> <4E160005.1020300@enterprisedb.com> <4E161881.6090800@enterprisedb.com> <2648.1310071735@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2648.1310071735@sss.pgh.pa.us> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.107 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RDNS_NONE=0.793 X-Spam-Level: X-Archive-Number: 201107/353 X-Sequence-Number: 191452 On Thu, Jul 07, 2011 at 04:48:55PM -0400, Tom Lane wrote: > 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? That part is already accomplished by setting SXACT_FLAG_PREPARED (and choosing a new victim if we think we want to abort a transaction with that flag set). prepareSeqNo is being used as a lower bound on the transaction's commit sequence number. It's currently set at the same time as the PREPARED flag, but it doesn't have to be. Dan -- Dan R. K. Ports MIT CSAIL http://drkp.net/