From: Dan Ports <drkp@csail.mit.edu>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-hackers@postgresql.org
Subject: Re: SSI atomic commit
Date: Thu, 7 Jul 2011 17:21:59 -0400
Message-ID: <20110707212159.GF76634@csail.mit.edu> (raw)
In-Reply-To: <4E161881.6090800@enterprisedb.com>
References: <4E12FDA8020000250003EFC1@gw.wicourts.gov>
<4E15D48A.7080203@enterprisedb.com>
<4E159B5C020000250003F063@gw.wicourts.gov>
<4E160005.1020300@enterprisedb.com>
<4E161881.6090800@enterprisedb.com>
We should also apply the attached patch, which corrects a minor issue
with the conditions for flagging transactions that could potentially
make a snapshot unsafe.
There's a small window wherein a transaction is committed but not yet
on the finished list, and we shouldn't flag it as a potential conflict
if so. We can also skip adding a doomed transaction to the list of
possible conflicts because we know it won't commit.
This is not really a related issue, but Kevin and I found it while
looking into this issue, and it was included in the patch we sent out.
Dan
--
Dan R. K. Ports MIT CSAIL http://drkp.net/Attachments:ssi-possibleconflict-test.patch (text/x-diff, 676B) download
*** a/src/backend/storage/lmgr/predicate.c
--- b/src/backend/storage/lmgr/predicate.c
***************
*** 1669,1676 **** RegisterSerializableTransactionInt(Snapshot snapshot)
othersxact != NULL;
othersxact = NextPredXact(othersxact))
{
! if (!SxactIsOnFinishedList(othersxact) &&
! !SxactIsReadOnly(othersxact))
{
SetPossibleUnsafeConflict(sxact, othersxact);
}
--- 1676,1684 ----
othersxact != NULL;
othersxact = NextPredXact(othersxact))
{
! if (!SxactIsCommitted(othersxact)
! && !SxactIsDoomed(othersxact)
! && !SxactIsReadOnly(othersxact))
{
SetPossibleUnsafeConflict(sxact, othersxact);
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: drkp@csail.mit.edu, heikki.linnakangas@enterprisedb.com, Kevin.Grittner@wicourts.gov
Subject: Re: SSI atomic commit
In-Reply-To: <20110707212159.GF76634@csail.mit.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox