forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita6dcf9d
committed
Rework handling of invalid indexes with REINDEX CONCURRENTLY
Per discussion with others, allowing REINDEX INDEX CONCURRENTLY to workfor invalid indexes when working directly on them can have a lot ofvalue to unlock situations with invalid indexes without having to use adance involving DROP INDEX followed by an extra CREATE INDEXCONCURRENTLY (which would not work for indexes with constraintdependency anyway). This also does not create extra bloat on therelation involved as this works on individual indexes, so let's enableit.Note that REINDEX TABLE CONCURRENTLY still bypasses invalid indexes aswe don't want to bloat the number of indexes defined on a relation inthe event of multiple and successive failures of REINDEX CONCURRENTLY.More regression tests are added to cover those behaviors, using aninvalid index created with CREATE INDEX CONCURRENTLY.Reported-by: Dagfinn Ilmari Mannsåker, Álvaro HerreraAuthor: Michael PaquierReviewed-by: Peter Eisentraut, Dagfinn Ilmari MannsåkerDiscussion:https://postgr.es/m/20190411134947.GA22043@alvherre.pgsql1 parentc8e0f6b commita6dcf9d
File tree
5 files changed
+80
-33
lines changed- doc/src/sgml/ref
- src
- backend/commands
- test/regress
- expected
- sql
5 files changed
+80
-33
lines changedLines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
586 | 586 |
| |
587 | 587 |
| |
588 | 588 |
| |
589 |
| - | |
590 |
| - | |
591 |
| - | |
592 |
| - | |
| 589 | + | |
| 590 | + | |
593 | 591 |
| |
594 | 592 |
| |
595 | 593 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
74 | 73 |
| |
75 | 74 |
| |
76 | 75 |
| |
|
Lines changed: 6 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2776 | 2776 |
| |
2777 | 2777 |
| |
2778 | 2778 |
| |
2779 |
| - | |
2780 |
| - | |
2781 |
| - | |
2782 |
| - | |
2783 |
| - | |
2784 | 2779 |
| |
2785 | 2780 |
| |
2786 | 2781 |
| |
| |||
2801 | 2796 |
| |
2802 | 2797 |
| |
2803 | 2798 |
| |
2804 |
| - | |
2805 |
| - | |
2806 |
| - | |
2807 |
| - | |
2808 |
| - | |
2809 |
| - | |
2810 |
| - | |
2811 |
| - | |
2812 |
| - | |
2813 |
| - | |
2814 |
| - | |
2815 |
| - | |
2816 |
| - | |
2817 |
| - | |
2818 |
| - | |
2819 |
| - | |
2820 |
| - | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
2821 | 2804 |
| |
2822 |
| - | |
| 2805 | + | |
2823 | 2806 |
| |
2824 | 2807 |
| |
2825 | 2808 |
| |
|
Lines changed: 47 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2118 | 2118 |
| |
2119 | 2119 |
| |
2120 | 2120 |
| |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
2121 | 2168 |
| |
2122 | 2169 |
| |
2123 | 2170 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
852 | 872 |
| |
853 | 873 |
| |
854 | 874 |
| |
|
0 commit comments
Comments
(0)