- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit8a54e12
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 parentf77717b commit8a54e12
File tree
7 files changed
+98
-37
lines changed- src
- backend/storage/lmgr
- include/storage
- test/isolation
- expected
- specs
7 files changed
+98
-37
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
904 | 904 |
| |
905 | 905 |
| |
906 | 906 |
| |
907 |
| - | |
908 |
| - | |
| 907 | + | |
909 | 908 |
| |
910 | 909 |
| |
911 | 910 |
| |
|
Lines changed: 25 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2903 | 2903 |
| |
2904 | 2904 |
| |
2905 | 2905 |
| |
2906 |
| - | |
2907 |
| - | |
2908 |
| - | |
| 2906 | + | |
2909 | 2907 |
| |
2910 | 2908 |
| |
2911 | 2909 |
| |
| |||
2930 | 2928 |
| |
2931 | 2929 |
| |
2932 | 2930 |
| |
2933 |
| - | |
2934 |
| - | |
| 2931 | + | |
| 2932 | + | |
2935 | 2933 |
| |
2936 | 2934 |
| |
2937 | 2935 |
| |
2938 | 2936 |
| |
2939 | 2937 |
| |
2940 | 2938 |
| |
2941 |
| - | |
| 2939 | + | |
| 2940 | + | |
2942 | 2941 |
| |
2943 | 2942 |
| |
2944 | 2943 |
| |
2945 |
| - | |
| 2944 | + | |
| 2945 | + | |
2946 | 2946 |
| |
2947 | 2947 |
| |
2948 | 2948 |
| |
| |||
3017 | 3017 |
| |
3018 | 3018 |
| |
3019 | 3019 |
| |
3020 |
| - | |
3021 |
| - | |
3022 |
| - | |
3023 |
| - | |
3024 |
| - | |
3025 | 3020 |
| |
3026 | 3021 |
| |
| 3022 | + | |
3027 | 3023 |
| |
3028 | 3024 |
| |
3029 | 3025 |
| |
| |||
3082 | 3078 |
| |
3083 | 3079 |
| |
3084 | 3080 |
| |
3085 |
| - | |
3086 |
| - | |
3087 |
| - | |
3088 |
| - | |
3089 |
| - | |
3090 | 3081 |
| |
3091 | 3082 |
| |
3092 | 3083 |
| |
| |||
3098 | 3089 |
| |
3099 | 3090 |
| |
3100 | 3091 |
| |
| 3092 | + | |
3101 | 3093 |
| |
3102 | 3094 |
| |
3103 | 3095 |
| |
| |||
3107 | 3099 |
| |
3108 | 3100 |
| |
3109 | 3101 |
| |
3110 |
| - | |
| 3102 | + | |
3111 | 3103 |
| |
3112 | 3104 |
| |
3113 | 3105 |
| |
| |||
4464 | 4456 |
| |
4465 | 4457 |
| |
4466 | 4458 |
| |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
4467 | 4474 |
| |
4468 | 4475 |
| |
4469 | 4476 |
| |
|
Lines changed: 9 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
65 |
| - | |
| 64 | + | |
| 65 | + | |
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
72 |
| - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
69 | 68 |
| |
70 |
| - | |
| 69 | + | |
71 | 70 |
| |
72 | 71 |
| |
73 |
| - | |
| 72 | + |
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 |
| - | |
28 |
| - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
|
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)