Re: VACUUM can finish an interrupted nbtree page split -- is that okay?

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VACUUM can finish an interrupted nbtree page split -- is that okay?
Date: 2019-05-07 16:59:56
Message-ID: CAH2-Wzkt+6zvnLacp9o2UrD20R5X_njTUXBdHoPuce7v_MUTXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 7, 2019 at 12:27 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> I don't understand that reasoning. Yes, _bt_pagedel() will complain if
> it finds a half-dead internal page. But how does that mean that
> _bt_lock_branch_parent() can't encounter one?

I suppose that in theory it could, but only if you allow that any
possible state could be found -- it doesn't seem any more likely than
any other random illegal state.

Even when it happens, we'll get a "failed to re-find parent key" error
message when we go a bit further. Isn't that a logical outcome?

Actually, maybe we won't get that error, because we're talking about a
corrupt index, and all bets are off -- no reason to think that the
half-dead internal page would be consistent with other pages in any
way. But even then, you'll go on to report it in the usual way, since
VACUUM scans nbtree indexes in physical order.
--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2019-05-07 17:14:04 Re: reloption to prevent VACUUM from truncating empty pages at the end of relation
Previous Message David Fetter 2019-05-07 16:47:59 Re: [PATCH v1] Add a way to supply stdin to TAP tests