From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Dan Ports <drkp@csail.mit.edu>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: SSI bug?
Date: Tue, 01 Mar 2011 19:07:42 +0200
Message-ID: <4D6D27DE.8080304@enterprisedb.com> (raw)
In-Reply-To: <20110301000306.GL10115@csail.mit.edu>
References: <4D616C14020000250003AD9A@gw.wicourts.gov>
<20110221234236.4635E19D574@mail.netbsd.org>
<20110222024129.GC74913@csail.mit.edu>
<4D639519020000250003AE0D@gw.wicourts.gov>
<20110222232054.GC61128@csail.mit.edu>
<20110301000306.GL10115@csail.mit.edu>
On 01.03.2011 02:03, Dan Ports wrote:
> An updated patch to address this issue is attached. It fixes a couple
> issues related to use of the backend-local lock table hint:
>
> - CheckSingleTargetForConflictsIn now correctly handles the case
> where a lock that's being held is not reflected in the local lock
> table. This fixes the assertion failure reported in this thread.
>
> - PredicateLockPageCombine now retains locks for the page that is
> being removed, rather than removing them. This prevents a
> potentially dangerous false-positive inconsistency where the local
> lock table believes that a lock is held, but it is actually not.
>
> - add some more comments documenting the times when the local lock
> table can be inconsistent with reality, as reflected in the shared
> memory table.
>
> This patch also incorporates Kevin's changes to copy locks when
> creating a new version of a tuple rather than trying to maintain a
> linkage between different versions. So this is a patch that should
> apply against HEAD and addresses all outstanding SSI bugs known to
> Kevin or myself.
Thanks, committed with minor changes.
The ordering of the fields in PREDICATELOCKTAG was bizarre, so I just
expanded the offsetnumber fields to an uint32, instead of having the
padding field. I think that's a lot more readable.
I also added an optimization in PredicateLockTupleRowVersionLink() to
not try to transfer the page locks, if the new tuple is on the same page
as the old one. That's very cheap to check, and it's very common for an
update to stay within a page.
Was there test cases for any of the issues fixed by this patch that we
should add to the suite?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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: heikki.linnakangas@enterprisedb.com, drkp@csail.mit.edu
Subject: Re: SSI bug?
In-Reply-To: <4D6D27DE.8080304@enterprisedb.com>
* 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