Re: Reduce pinning in btree indexes - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Reduce pinning in btree indexes
Date
Msg-id CAM3SWZQ5nwTB-y4ZOj=5ckMLce5GAEUnjKJ2=M1vMHfX_aYmCg@mail.gmail.com
Whole thread Raw
In response to Reduce pinning in btree indexes  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Reduce pinning in btree indexes  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On Sat, Feb 14, 2015 at 4:19 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
> At some point we could consider building on this patch to recheck
> index conditions for heap access when a non-MVCC snapshot is used,
> check the visibility map for referenced heap pages when the TIDs
> are read for an index-only scan, and/or skip LP_DEAD hinting for
> non-WAL-logged indexes.  But all those are speculative future work;
> this is a conservative implementation that just didn't modify
> pinning where there were any confounding factors.

I don't have the bandwidth for a full review, but I took a quick look at this.

I think you should call out those "confounding factors" in the README.
It's not hard to piece them together from
_bt_drop_lock_and_maybe_pin(), but I think you should anyway.

Don't use BUFFER_LOCK_SHARE -- use BT_READ, as the existing nbtree
LockBuffer() callers do. You're inconsistent about that in V3.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Ewan Higgs
Date:
Subject: Moving Pivotal's Greenplum work upstream
Next
From: Josh Berkus
Date:
Subject: Re: Moving Pivotal's Greenplum work upstream