forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd3abbbe
committed
Avoid early reuse of btree pages, causing incorrect query results.
When we allowed read-only transactions to skip assigning XIDswe introduced the possibility that a fully deleted btree pagecould be reused. This broke the index link sequence which couldthen lead to indexscans silently returning fewer rows than wouldhave been correct. The actual incidence of silent errors fromthis is thought to be very low because of the exact workloadrequired and locking pre-conditions. Fix is to remove pages onlyif index page opaque->btpo.xact precedes RecentGlobalXmin.Noah Misch, reviewed by Simon Riggs1 parent3e4d3a3 commitd3abbbe
3 files changed
+20
-26
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 |
| - | |
265 |
| - | |
| 264 | + | |
| 265 | + | |
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
269 |
| - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
270 | 272 |
| |
271 | 273 |
| |
272 | 274 |
| |
|
Lines changed: 10 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
558 | 558 |
| |
559 | 559 |
| |
560 | 560 |
| |
561 |
| - | |
562 |
| - | |
563 | 561 |
| |
564 | 562 |
| |
565 |
| - | |
566 |
| - | |
567 |
| - | |
568 |
| - | |
569 |
| - | |
570 |
| - | |
571 |
| - | |
572 |
| - | |
573 |
| - | |
| 563 | + | |
574 | 564 |
| |
575 | 565 |
| |
576 | 566 |
| |
| |||
685 | 675 |
| |
686 | 676 |
| |
687 | 677 |
| |
688 |
| - | |
689 | 678 |
| |
690 | 679 |
| |
691 | 680 |
| |
| |||
698 | 687 |
| |
699 | 688 |
| |
700 | 689 |
| |
701 |
| - | |
702 |
| - | |
703 |
| - | |
| 690 | + | |
704 | 691 |
| |
705 |
| - | |
706 |
| - | |
707 |
| - | |
708 |
| - | |
709 |
| - | |
710 | 692 |
| |
711 | 693 |
| |
712 |
| - | |
| 694 | + | |
713 | 695 |
| |
714 | 696 |
| |
715 | 697 |
| |
| |||
1376 | 1358 |
| |
1377 | 1359 |
| |
1378 | 1360 |
| |
1379 |
| - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
1380 | 1368 |
| |
1381 | 1369 |
| |
1382 | 1370 |
| |
|
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
968 | 968 |
| |
969 | 969 |
| |
970 | 970 |
| |
971 |
| - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
972 | 976 |
| |
973 | 977 |
| |
974 | 978 |
| |
|
0 commit comments
Comments
(0)