On Tue, Jan 21, 2020 at 9:06 AM Jesper Pedersen <jesper.peder...@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