Re: Reproducible GIST index corruption under concurrent updates

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Duncan Sands <duncan.sands@deepbluecap.com>, Andrey Borodin <x4mmm@yandex-team.ru>, pgsql-bugs@lists.postgresql.org
Date: 2021-01-20T22:26:12Z
Lists: pgsql-bugs
On 20/01/2021 17:25, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>> Pushed as commit 6b4d3046f4, and backpatched down to version 12, where
>> this bug was introduced. It will appear in the next minor release.
> 
> I see you noted that REINDEX is required to repair any corrupted indexes.
> For the purposes of the release notes, can we characterize which indexes
> might be affected, or do we just have to say "better reindex all GIST
> indexes"?

Any GiST index that's been concurrently inserted might be corrupt. 
Better reindex all GiST indexes.

- Heikki

P.S. The GiST amcheck extension that's been discussed at [1] would catch 
this corruption, so if that was already committed, we could suggest 
using it. But that doesn't help us now.

[1] 
https://www.postgresql.org/message-id/CAF3eApa07-BajjG8+RYx-Dr_cq28ZA0GsZmUQrGu5b2ayRhB5A@mail.gmail.com 
would catch this corruption



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix bug in detecting concurrent page splits in GiST insert

  2. Refactor checks for deleted GiST pages.