Commit 74eb217
committed
Invalidate binary search bounds consistently.
_bt_check_unique() failed to invalidate binary search bounds in the
event of a live conflict following commit e5adcb7. 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.com1 parent 87e16db commit 74eb217
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | | - | |
| 451 | + | |
| 452 | + | |
451 | 453 | | |
452 | 454 | | |
453 | 455 | | |
| |||
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| 475 | + | |
| 476 | + | |
473 | 477 | | |
474 | 478 | | |
475 | 479 | | |
| |||
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| 533 | + | |
529 | 534 | | |
530 | 535 | | |
531 | 536 | | |
| |||
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
| 609 | + | |
604 | 610 | | |
605 | 611 | | |
606 | 612 | | |
| |||
0 commit comments