- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit77a0e14
committed
Fix CREATE INDEX CONCURRENTLY for simultaneous prepared transactions.
In a cluster having used CREATE INDEX CONCURRENTLY while having enabledprepared transactions, queries that use the resulting index can silentlyfail to find rows. Fix this for future CREATE INDEX CONCURRENTLY bymaking it wait for prepared transactions like it waits for ordinarytransactions. This expands the VirtualTransactionId structure domain toadmit prepared transactions. It may be necessary to reindex to recoverfrom past occurrences. Back-patch to 9.5 (all supported versions).Andrey Borodin, reviewed (in earlier versions) by Tom Lane and MichaelPaquier.Discussion:https://postgr.es/m/2E712143-97F7-4890-B470-4A35142ABC82@yandex-team.ru1 parentd777e27 commit77a0e14
File tree
7 files changed
+100
-38
lines changed- src
- backend/storage/lmgr
- include/storage
- test/isolation
- expected
- specs
7 files changed
+100
-38
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
811 | 811 |
| |
812 | 812 |
| |
813 | 813 |
| |
814 |
| - | |
815 |
| - | |
| 814 | + | |
816 | 815 |
| |
817 | 816 |
| |
818 | 817 |
| |
|
Lines changed: 25 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2705 | 2705 |
| |
2706 | 2706 |
| |
2707 | 2707 |
| |
2708 |
| - | |
2709 |
| - | |
2710 |
| - | |
| 2708 | + | |
2711 | 2709 |
| |
2712 | 2710 |
| |
2713 | 2711 |
| |
| |||
2732 | 2730 |
| |
2733 | 2731 |
| |
2734 | 2732 |
| |
2735 |
| - | |
2736 |
| - | |
| 2733 | + | |
| 2734 | + | |
2737 | 2735 |
| |
2738 | 2736 |
| |
2739 | 2737 |
| |
2740 | 2738 |
| |
2741 | 2739 |
| |
2742 | 2740 |
| |
2743 |
| - | |
| 2741 | + | |
| 2742 | + | |
2744 | 2743 |
| |
2745 | 2744 |
| |
2746 | 2745 |
| |
2747 |
| - | |
| 2746 | + | |
| 2747 | + | |
2748 | 2748 |
| |
2749 | 2749 |
| |
2750 | 2750 |
| |
| |||
2819 | 2819 |
| |
2820 | 2820 |
| |
2821 | 2821 |
| |
2822 |
| - | |
2823 |
| - | |
2824 |
| - | |
2825 |
| - | |
2826 |
| - | |
2827 | 2822 |
| |
2828 | 2823 |
| |
| 2824 | + | |
2829 | 2825 |
| |
2830 | 2826 |
| |
2831 | 2827 |
| |
| |||
2882 | 2878 |
| |
2883 | 2879 |
| |
2884 | 2880 |
| |
2885 |
| - | |
2886 |
| - | |
2887 |
| - | |
2888 |
| - | |
2889 |
| - | |
2890 | 2881 |
| |
2891 | 2882 |
| |
2892 | 2883 |
| |
| |||
2898 | 2889 |
| |
2899 | 2890 |
| |
2900 | 2891 |
| |
| 2892 | + | |
2901 | 2893 |
| |
2902 | 2894 |
| |
2903 | 2895 |
| |
| |||
2907 | 2899 |
| |
2908 | 2900 |
| |
2909 | 2901 |
| |
2910 |
| - | |
| 2902 | + | |
2911 | 2903 |
| |
2912 | 2904 |
| |
2913 | 2905 |
| |
| |||
4052 | 4044 |
| |
4053 | 4045 |
| |
4054 | 4046 |
| |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
| 4050 | + | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
| 4057 | + | |
| 4058 | + | |
| 4059 | + | |
| 4060 | + | |
| 4061 | + | |
4055 | 4062 |
| |
4056 | 4063 |
| |
4057 | 4064 |
| |
|
Lines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
61 |
| - | |
62 |
| - | |
| 60 | + | |
| 61 | + | |
63 | 62 |
| |
64 | 63 |
| |
65 | 64 |
| |
66 | 65 |
| |
67 | 66 |
| |
68 |
| - | |
69 |
| - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
55 | 54 |
| |
56 |
| - | |
| 55 | + | |
57 | 56 |
| |
58 | 57 |
| |
59 |
| - | |
| 58 | + |
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
23 |
| - | |
24 |
| - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 |
| |
26 | 28 |
| |
27 | 29 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + |
Lines changed: 37 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + |
0 commit comments
Comments
(0)