Re: Assertion failure in _bt_pagedel (leafblkno == scanblkno) after interrupted VACUUM - Mailing list pgsql-bugs

From Iliia Khaprov
Subject Re: Assertion failure in _bt_pagedel (leafblkno == scanblkno) after interrupted VACUUM
Date
Msg-id CAFO+O_q_e_OEAoU4hpUQ384s+f+rjY-DPtj=q46p_=6kLvyu4w@mail.gmail.com
Whole thread
In response to Re: Assertion failure in _bt_pagedel (leafblkno == scanblkno) after interrupted VACUUM  (shihao zhong <zhong950419@gmail.com>)
List pgsql-bugs
Thank you Shihao,

I will submit a patch.

Best regards,
Iliia

On Wed, Sep 30, 2026 at 7:00 AM shihao zhong <zhong950419@gmail.com> wrote:
Hi Iliia,

Thanks, I can reproduce this on master with your script.

_bt_pagedel() builds no descent stack when the page it is given is
already half-dead. If the right sibling of that page is empty too, it
steps right and builds the stack there. The assertion insisted that this
only happens for the initial page. That stopped being true once an
interrupted VACUUM could leave the initial page half-dead. 

Feels like the right way is to remove the assertion.

Thanks,
Shihao

pgsql-bugs by date:

Previous
From: shihao zhong
Date:
Subject: Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows
Next
From: John Naylor
Date:
Subject: Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows