Re: BUG #17245: Index corruption involving deduplicated entries

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Kamigishi Rei <iijima(dot)yun(at)koumakan(dot)jp>, David Rowley <dgrowley(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17245: Index corruption involving deduplicated entries
Date: 2021-10-28 21:39:37
Message-ID: CA+hUKGLtrpQnOQpBvJXQX+o2NJJ47Rmu=qt+F3tdhwCaaEoa9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Oct 29, 2021 at 10:31 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2021-10-28 10:16:35 -0700, Peter Geoghegan wrote:
> > Your heap page (page 0 of the "page" heap relation) was very
> > interesting. I saw that the TID that is incorrectly repeated in the
> > index "page_len" is marked LP_UNUSED in the heap page. It's one of
> > only two such TIDs/line pointers on your heap/table page, out of 61
> > total, so I doubt that this is a coincidence. That's why I'm asking
> > for more heap pages -- I would like to verify that this is a
> > consistent thing, and not just a remarkable coincidence.
>
> This makes me wonder if the issue could be that we're loosing writes / that
> something is reading old page versions (e.g. due to filesystem bug). If both
> heap and index are vacuumed, but the index write is lost, this'd be what we
> see, right?

Relevant to this hypothesis, it's interesting that FreeBSD 13.0 is the
first release that switched to OpenZFS, a big rebase to a common ZFS
implementation shared with eg Ubuntu (whereas previously multiple
groups targeting different OSes maintained different forks deriving
from OpenSolaris code). I see there is another suspected related
report[1], and it's on Ubuntu, but filesystem is not mentioned.

[1] https://www.postgresql.org/message-id/flat/8CDB73C1-E3AF-40A6-BA81-8AFE174C6402%40verschooten.net

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Borisov 2021-10-28 21:39:50 Re: BUG #17245: Index corruption involving deduplicated entries
Previous Message Andres Freund 2021-10-28 21:36:12 Re: BUG #17245: Index corruption involving deduplicated entries