Re: BUG #17245: Index corruption involving deduplicated entries

From: Kamigishi Rei <iijima(dot)yun(at)koumakan(dot)jp>
To: Peter Geoghegan <pg(at)bowt(dot)ie>, David Rowley <dgrowley(at)gmail(dot)com>
Cc: Herman verschooten <Herman(at)verschooten(dot)ne>, Thomas Munro <thomas(dot)munro(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>, Herman verschooten <Herman(at)verschooten(dot)net>
Subject: Re: BUG #17245: Index corruption involving deduplicated entries
Date: 2021-10-28 07:34:46
Message-ID: 8b7719fe-43eb-8386-055c-f9e291eec261@koumakan.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 28.10.2021 4:36, Peter Geoghegan wrote:
> On Wed, Oct 27, 2021 at 12:00 AM Kamigishi Rei <iijima(dot)yun(at)koumakan(dot)jp> wrote:
> One more question: Did you use pg_restore with -j (jobs) to make the
> restore faster?

I am afraid I have not used pg_restore (as far as I know), unless psql
replicates its behaviour and/or calls it. My typical procedure is
`pg_dump[all] -U … -d … > file.sql`, followed by `psql -U … -d … <
file.sql`. It did not seem like psql used any kind of parallel query
execution, judging by the console output.

> Just one more request: Can I have some more pages from the same
> indexes? You have already provided me with
> "mediawiki.transcode_key_idx.block1.page". But could you now also
> provide me with blocks 2, 8, and 16 from the same index? This is a
> pretty random choice. I just want to see if they all contain corrupt
> posting list tuples, like page 1 (I suspect that they all will).

Despatched in a separate e-mail along with page 0 from "mediawiki.page"
requested in your follow-up message.

> Note that I pushed some additional hardening for posting list splits
> today. This will be in Postgres 14.1. The new code won't fix the
> problem, but it will detect problems earlier, limiting the damage.

Would you recommend applying the patch to my ‘production’ instance or
should keep it as is to see if that undetectable corruption case
(leading to weird SELECT etc. results) shows up again?

> These pages look like CREATE INDEX was run
> recently, despite all the corruption. Plus Herman (CC'd) has said that
> sometimes CREATE INDEX doesn't correct his own similar problem on
> Postgres 14.

CREATE INDEX was run during the import of the 13.3-generated dump; there
were no schema changes since. The transcode table gets updated every
time an audio file is uploaded, which happened quite a few times since
the upgrade.

--
K. R.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kamigishi Rei 2021-10-28 08:04:05 Re: BUG #17245: Index corruption involving deduplicated entries
Previous Message Peter Geoghegan 2021-10-28 04:21:57 Re: BUG #17245: Index corruption involving deduplicated entries