Commit 962e0cc
committed
Fix race conditions associated with SPGiST redirection tuples.
The correct test for whether a redirection tuple is removable is whether
tuple's xid < RecentGlobalXmin, not OldestXmin; the previous coding
failed to protect index searches being done in concurrent transactions that
have no XID. This mirrors the recent fix in btree's page recycling logic
made in commit d3abbbe.
Also, WAL-log the newest XID of any removed redirection tuple on an index
page, and apply ResolveRecoveryConflictWithSnapshot during InHotStandby WAL
replay. This protects against concurrent Hot Standby transactions possibly
needing to see the redirection tuple(s).
Per my query of 2012-03-12 and subsequent discussion.1 parent 7719ed0 commit 962e0cc
File tree
4 files changed
+27
-12
lines changed- src
- backend/access/spgist
- include/access
4 files changed
+27
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
| |||
491 | 489 | | |
492 | 490 | | |
493 | 491 | | |
494 | | - | |
495 | | - | |
| 492 | + | |
496 | 493 | | |
497 | 494 | | |
498 | 495 | | |
| |||
509 | 506 | | |
510 | 507 | | |
511 | 508 | | |
| 509 | + | |
512 | 510 | | |
513 | 511 | | |
514 | 512 | | |
| |||
526 | 524 | | |
527 | 525 | | |
528 | 526 | | |
529 | | - | |
| 527 | + | |
530 | 528 | | |
531 | 529 | | |
532 | 530 | | |
533 | 531 | | |
534 | 532 | | |
535 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
| |||
640 | 643 | | |
641 | 644 | | |
642 | 645 | | |
643 | | - | |
| 646 | + | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
648 | 651 | | |
649 | | - | |
| 652 | + | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
| |||
723 | 726 | | |
724 | 727 | | |
725 | 728 | | |
726 | | - | |
| 729 | + | |
727 | 730 | | |
728 | 731 | | |
729 | 732 | | |
| |||
806 | 809 | | |
807 | 810 | | |
808 | 811 | | |
809 | | - | |
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
888 | 889 | | |
889 | 890 | | |
890 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
891 | 901 | | |
892 | 902 | | |
893 | 903 | | |
| |||
1060 | 1070 | | |
1061 | 1071 | | |
1062 | 1072 | | |
1063 | | - | |
1064 | | - | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
1065 | 1076 | | |
1066 | 1077 | | |
1067 | 1078 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| 594 | + | |
594 | 595 | | |
595 | 596 | | |
596 | 597 | | |
| |||
0 commit comments