pgsql: Invalidate binary search bounds consistently.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Invalidate binary search bounds consistently.
Date: 2019-04-04 16:40:12
Message-ID: E1hC5PQ-0005D8-3D@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Invalidate binary search bounds consistently.

_bt_check_unique() failed to invalidate binary search bounds in the
event of a live conflict following commit e5adcb78. This resulted in
problems after waiting for the conflicting xact to commit or abort. The
subsequent call to _bt_check_unique() would restore the initial binary
search bounds, rather than starting a new search. Fix by explicitly
invalidating bounds when it becomes clear that there is a live conflict
that insertion will have to wait to resolve.

Ashutosh Sharma, with a few additional tweaks by me.

Author: Ashutosh Sharma
Reported-By: Ashutosh Sharma
Diagnosed-By: Ashutosh Sharma
Discussion: https://postgr.es/m/CAE9k0PnQp-qr-UYKMSCzdC2FBzdE4wKP41hZrZvvP26dKLonLg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74eb2176bf3ac7a2fae1282b4f4f1d000f3e6d78

Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2019-04-04 19:05:14 pgsql: Allow VACUUM to be run with index cleanup disabled.
Previous Message Stephen Frost 2019-04-04 15:12:24 pgsql: Move the be_gssapi_get_* prototypes