Re: SSI bug? - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: SSI bug?
Date
Msg-id 4D6444B9020000250003AE98@gw.wicourts.gov
Whole thread Raw
In response to SSI bug?  (yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi))
Responses Re: SSI bug?  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Dan Ports  wrote:
> The obvious solution to me is to just keep the lock on both the old
> and new page.
That's the creative thinking I was failing to do.  Keeping the old
lock will generate some false positives, but it will be rare and
those don't compromise correctness -- they just carry the cost of
starting the transaction over.  In exchange you buy a savings in
predicate lock acquisition.  In particular, by dodging LW locking for
a large percentage of calls, you help scalability.  It can't cause
false negatives, so correctness is OK -- it's all about net costs.
> I was going to bemoan the extra complexity this would add -- but
> actually, couldn't we just replace PredicateLockPageCombine with a
> call to PredicateLockPageSplit since they'd now do the same thing?
I'd be inclined to leave the external interface alone, in case we
conceive of an even better implementation.  We can just remove the
removeOld bool from the parameter list of the static
TransferPredicateLocksToNewTarget function, and keep the behavior
from the "false" case.
-Kevin


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Correctly producing array literals for prepared statements
Next
From: Nathan Boley
Date:
Subject: Re: WIP: cross column correlation ...