Re: SSI bug?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <drkp(at)csail(dot)mit(dot)edu>
Cc: <heikki(dot)linnakangas(at)enterprisedb(dot)com>,<yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SSI bug?
Date: 2011-02-23 05:20:25
Message-ID: 4D6444B9020000250003AE98@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

  • Re: SSI bug? at 2011-02-24 17:10:58 from Heikki Linnakangas

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Boley 2011-02-23 05:50:50 Re: WIP: cross column correlation ...
Previous Message Greg Stark 2011-02-23 04:36:38 Re: Correctly producing array literals for prepared statements