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-14 03:18:20
Message-ID: CAH2-WznOJS-=dEQ9JF+wq-=hbGsMp3o0MvZbCrc5xGDA7fPHnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 7, 2019 at 9:59 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> 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.

To be fair, I suppose that the code made more sense when it first went
in, because at the time there was a chance that there could be
leftover half-dead internal pages. But, that was a long time ago now.

I wonder why the code wasn't complaining about corruption loudly, like
the top level code, instead of treating half-dead pages as a
legitimate reason to not proceed with multi-level page deletion. That
would have been overkill, but it would have made much more sense IMV.

I would like to proceed with pushing this patch to HEAD in the next
few days, since it's clearly removing code that can't be useful. Are
there any objections?

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-14 03:28:51 Re: PANIC :Call AbortTransaction when transaction id is no normal
Previous Message Kyotaro HORIGUCHI 2019-05-14 03:06:13 Re: standby recovery fails (tablespace related) (tentative patch and discussion)