From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Duncan Sands <duncan.sands@deepbluecap.com>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Reproducible GIST index corruption under concurrent updates
Date: Wed, 20 Jan 2021 12:04:23 +0200
Message-ID: <b9cee27d-0ce9-7708-d197-580f62e5dab7@iki.fi> (raw)
In-Reply-To: <55ea6133-f2d1-0cc5-8ce5-333e373164ba@deepbluecap.com>
References: <a9690483-6c6c-3c82-c8ba-dc1a40848f11@deepbluecap.com>
<28663562-8489-4680-BC26-CAEADEB258D1@yandex-team.ru>
<132baf64-3764-0351-750e-0443e74f1052@iki.fi>
<907491b3-87c7-aadd-3fb1-be3c542b7fb7@iki.fi>
<55ea6133-f2d1-0cc5-8ce5-333e373164ba@deepbluecap.com>
On 20/01/2021 10:23, Duncan Sands wrote:
>> The comment change was correct, but the condition used &&. Should've been ||.
>> There is another copy of basically the same condition earlier in the function
>> that was changed correctly, but I blundered this one. Oops.
>>
>> The attached patch fixes this. I also added an assertion to the
>> gistplacetopage() function, to check that we never try to insert on a deleted
>> page. This bug could've made that happen too, although in this case the problem
>> was a concurrent split, not a deletion. I'll backpatch and push this tomorrow.
>>
>> Many thanks for the easy reproducer script, Duncan!
>
> No problem Heikki, thanks for the quick fix.
Pushed as commit 6b4d3046f4, and backpatched down to version 12, where
this bug was introduced. It will appear in the next minor release.
- Heikki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnaka@iki.fi, duncan.sands@deepbluecap.com, x4mmm@yandex-team.ru
Subject: Re: Reproducible GIST index corruption under concurrent updates
In-Reply-To: <b9cee27d-0ce9-7708-d197-580f62e5dab7@iki.fi>
References: <a9690483-6c6c-3c82-c8ba-dc1a40848f11@deepbluecap.com> <28663562-8489-4680-BC26-CAEADEB258D1@yandex-team.ru> <132baf64-3764-0351-750e-0443e74f1052@iki.fi> <907491b3-87c7-aadd-3fb1-be3c542b7fb7@iki.fi> <55ea6133-f2d1-0cc5-8ce5-333e373164ba@deepbluecap.com> <b9cee27d-0ce9-7708-d197-580f62e5dab7@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox