Re: Index Skip Scan - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Index Skip Scan
Date
Msg-id CAH2-Wzm3fjNHfn06nZK9XgmoXc9c8LkFyJeZJ0yC0CyVM_xQNA@mail.gmail.com
Whole thread Raw
In response to Re: Index Skip Scan  (Jesper Pedersen <jesper.pedersen@redhat.com>)
List pgsql-hackers
On Tue, Jan 21, 2020 at 9:06 AM Jesper Pedersen
<jesper.pedersen@redhat.com> wrote:
> If you apply the attached patch on master it will fail the test suite;
> did you mean something else ?

Yeah, this is exactly what I had in mind for the _bt_readpage() assertion.

As I said, it isn't a great sign that this kind of assertion is even
necessary in index access method code (code like bufmgr.c is another
matter). Usually it's just obvious that a buffer lock is held. I can't
really blame this patch for that, though. You could say the same thing
about the existing "buffer pin held" _bt_readpage() assertion. It's
good that it verifies what is actually a fragile assumption, even
though I'd prefer to not make a fragile assumption.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Georgios Kokolatos
Date:
Subject: Re: Duplicate Workers entries in some EXPLAIN plans
Next
From: Robert Haas
Date:
Subject: Re: making the backend's json parser work in frontend code