Re: index prefetching - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: index prefetching
Date
Msg-id 3f748033-4679-44c2-a74d-b3306528e443@vondra.me
Whole thread Raw
In response to Re: index prefetching  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: index prefetching
Re: index prefetching
List pgsql-hackers
Hi,

I took a quick look at 0001 and 0002 patches, and I think it's mostly
ready to go.

I only have a couple very minor comments:

1) v12-0001-Use-simple-hash-for-PrivateRefCount.patch

- seems like a (mostly) mechanical switch for a different hashtable
- I don't see anything particularly wrong with it
- the "common/hashfn.h" include seems in the wrong place
- it seems we're losing "Assert(found)" in GetPrivateRefCountEntrySlow,
not sure if that's a problem in practice


2) v12-0002-Don-t-allocate-_bt_search-stack.patch

- seems like a reasonable optimization for most callers
- _bt_search could set "stack_in = new_stack;" in the first if block, I
think it's nicer
- My only concern is that _bt_search is part of the public API (at least
technically, as it's in nbtree.h), and we're removing _bt_freestack()
from the API so the callers won't have a convenient way to free it.
Maybe that's not an issue in practice, because doing a local version of
freestack is easy.



regards

-- 
Tomas Vondra




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Serverside SNI support in libpq
Next
From: Tom Lane
Date:
Subject: Re: Areas for Solaris support modernization