Re: [PATCH] Btree BackwardScan race condition on Standby during VACUUM - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: [PATCH] Btree BackwardScan race condition on Standby during VACUUM
Date
Msg-id CAH2-Wz=1RLqEn-cvGUincCX+ji9Yk-tWzLyB_kmoxJpkS+v-xw@mail.gmail.com
Whole thread Raw
In response to [PATCH] Btree BackwardScan race condition on Standby during VACUUM  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Responses Re: [PATCH] Btree BackwardScan race condition on Standby during VACUUM  (Daniel Gustafsson <daniel@yesql.se>)
Re: [PATCH] Btree BackwardScan race condition on Standby during VACUUM  (Michail Nikolaev <michail.nikolaev@gmail.com>)
List pgsql-hackers
On Mon, Mar 16, 2020 at 7:08 AM Michail Nikolaev
<michail.nikolaev@gmail.com> wrote:
> While working on support for index hint bits on standby [1] I have
> started to getting
> "ERROR:  could not find left sibling of block XXXX in index XXXX"
> during stress tests.

I reproduced the bug using your steps (including the pg_usleep() hack)
today. It was fairly easy to confirm the problem.

Attached is a revised version of your patch. It renames the buffer
variable names, and changes the precise order in which the locks are
released (for consistency with _bt_unlink_halfdead_page()). It also
changes the comments, and adds a new paragraph to the README. The
existing paragraph was about cross-level differences, this new one is
about same-level differences (plus a second new paragraph to talk
about backwards scans + page deletion).

This revised version is essentially the same as your original patch --
I have only made superficial adjuments. I think that I will be able to
commit this next week, barring objections.

--
Peter Geoghegan

Attachment

pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: Comment simplehash/dynahash trade-offs
Next
From: Daniel Gustafsson
Date:
Subject: Re: psql - improve test coverage from 41% to 88%