From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Orphan page in _bt_split |
Date: | 2025-09-01 19:18:48 |
Message-ID: | CAH2-WznWd6dQhvLycx8BoSkp0SZrzYqkJKV=GYfi+8ggh3YjMw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Sep 1, 2025 at 3:04 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> There's just no reason to think that we'd ever be able to tie back one
> of these LOG messages from VACUUM to the problem within _bt_split.
> There's too many other forms of corruption that might result in VACUUM
> logging this same error (e.g., breaking changes to a glibc collation).
Thinking about this some more, I guess it's generally fairly unlikely
that VACUUM would actually even attempt to delete such a page. The
only reason why it happens with Konstantin's test case is because the
whole inserting transaction aborts, leaving behind many garbage tuples
that VACUUM will remove, leading to an empty page. Without that,
VACUUM won't think to even try to delete a left over junk right
sibling page.
> An important case where this weakness will make life worse for users
> is a checksum failure against the existing right sibling page -- since
> those are not once off, transient errors (unlike, say, OOMs). Once you
> have an index page with a bad checksum, there's a decent chance that
> the application will attempt to insert onto the page to the immediate
> left of that bad page. That'll trigger a split, sooner or later.
Also rethinking this aspect: a checksum failure probably *isn't* going
to make much difference. Since that'll also cause bigger problems for
VACUUM than logging one of these "failed to re-find parent key"
messages.
I still think that we should do something about this. Not sure how I
feel about backpatching just yet.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2025-09-01 20:26:03 | Re: MergeAppend could consider sorting cheapest child path |
Previous Message | Alena Rybakina | 2025-09-01 19:13:18 | Re: Vacuum statistics |