Re: Allow cancelling VACUUM of nbtrees with corrupted right links

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow cancelling VACUUM of nbtrees with corrupted right links
Date: 2018-06-27 19:52:41
Message-ID: 20180627195241.oqpdbrzgdrqgqhwv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2018-06-27 12:49:56 -0700, Peter Geoghegan wrote:
> On Wed, Jun 27, 2018 at 12:18 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > It's possibly wrong that it's unreachable - I've just not managed to get
> > there. If somebody has an idea how to build a reproducible case to reach
> > it...
>
> Set a breakpoint in _bt_unlink_halfdead_page() after the initial
> "LockBuffer(leafbuf, BUFFER_LOCK_UNLOCK);", and then provoke a page
> split in the left sibling by carefully inserting values that belong
> within its part of the key space? I would probably attempt this with
> an index on text, so that I could contrive as many key values that
> belong on the left sibling as needed.

A related question is if it matters - without complicating the code I
don't see how we could release all the locks in that loop. Therefore no
interrupts can be accepted. I hope I'm missing something?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-06-27 20:02:25 Re: Allow cancelling VACUUM of nbtrees with corrupted right links
Previous Message Peter Geoghegan 2018-06-27 19:49:56 Re: Allow cancelling VACUUM of nbtrees with corrupted right links