On Tue, Oct 24, 2023 at 8:05 PM Noah Misch <noah@leadboat.com> wrote:
> Can't it still happen if the sequence of unfortunately timed crashes causes
> deletions from left to right? Take this example, expanding the one above.
> Half-kill 4, crash, half-kill 3, crash, half-kill 2 in:
>
> * 1
> * / / | \ \
> * 4 <-> 3 <-> 2 <-> 1
>
> (That's not to say it has ever happened outside of a test.)
Hmm. Perhaps you're right. I thought that this wasn't possible in part
due to the fact that you'd have to access all of these leaf pages in
the same order each time, without ever passing over a previous
half-dead page. But I suppose that there's nothing stopping the index
tuples from being deleted from each page in an order that leaves open
the possibility of something like this. (It's extremely unlikely, of
course, but that wasn't ever in question.)
I withdraw my suggestion about the wording from your patch. It seems
committable.
Thanks
--
Peter Geoghegan