On Tue, Jun 27, 2023 at 11:18 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> I'll push these in a couple of days if there are no further comments.
I spotted an oversight in this fix: scans that use no scan keys (i.e.,
full index scans, or the first primscan used during a skip scan) will
go through _bt_endpoint, which lacks the _bt_first handling that you
added to the end of _bt_first (which will never be reached). You need
a second copy of the empty tree handling in _bt_endpoint.
Attached bug fix shows what I mean.
There's a second patch that adds an isolation test that would have
caught the original problem, as well as this still-overlooked
_bt_endpoint variant. When this fix went in we didn't have injection
points. Now we do, which makes testing these kinds of scenarios
straightforward.
--
Peter Geoghegan