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