forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2cbc3c1
committed
Rework logic and simplify syntax of REINDEX DATABASE/SYSTEM
Per discussion, this commit includes a couple of changes to these twoflavors of REINDEX:* The grammar is changed to make the name of the object optional, henceone can rebuild all the indexes of the wanted area by specifying only"REINDEX DATABASE;" or "REINDEX SYSTEM;". Previously, the object namewas mandatory and had to match the name of the database on which thecommand is issued.* REINDEX DATABASE is changed to ignore catalogs, making this task onlypossible with REINDEX SYSTEM. This is a historical change, but therewas no way to work only on the indexes of a database without touchingthe catalogs. We have discussed more approaches here, like the additionof an option to skip the catalogs without changing the originalbehavior, but concluded that what we have here is for the best.This builds on top of the TAP tests introduced in5fb5b6c, showing thechange in behavior for REINDEX SYSTEM. reindexdb is updated so as we donot issue an extra REINDEX SYSTEM when working on a database in thenon-concurrent case, something that was confusing when --concurrentlygot introduced, so this simplifies the code.Author: Simon RiggsReviewed-by: Ashutosh Bapat, Bernd Helmle, Álvaro Herrera, Cary Huang,Michael PaquierDiscussion:https://postgr.es/m/CANbhV-H=NH6Om4-X6cRjDWfH_Mu1usqwkuYVp-hwdB_PSHWRfg@mail.gmail.com1 parent5fb5b6c commit2cbc3c1
File tree
5 files changed
+51
-37
lines changed- doc/src/sgml/ref
- src
- backend
- commands
- parser
- bin/scripts
- t
5 files changed
+51
-37
lines changedLines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
| 24 | + | |
| 25 | + | |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
| |||
126 | 127 |
| |
127 | 128 |
| |
128 | 129 |
| |
129 |
| - | |
130 |
| - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
131 | 133 |
| |
132 | 134 |
| |
133 | 135 |
| |
| |||
154 | 156 |
| |
155 | 157 |
| |
156 | 158 |
| |
157 |
| - | |
158 |
| - | |
| 159 | + | |
| 160 | + | |
159 | 161 |
| |
160 | 162 |
| |
161 | 163 |
| |
|
Lines changed: 16 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2877 | 2877 |
| |
2878 | 2878 |
| |
2879 | 2879 |
| |
2880 |
| - | |
2881 | 2880 |
| |
2882 | 2881 |
| |
2883 | 2882 |
| |
2884 | 2883 |
| |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
2885 | 2890 |
| |
2886 | 2891 |
| |
2887 | 2892 |
| |
| |||
2906 | 2911 |
| |
2907 | 2912 |
| |
2908 | 2913 |
| |
2909 |
| - | |
| 2914 | + | |
2910 | 2915 |
| |
2911 | 2916 |
| |
2912 | 2917 |
| |
2913 | 2918 |
| |
2914 | 2919 |
| |
2915 |
| - | |
| 2920 | + | |
2916 | 2921 |
| |
2917 | 2922 |
| |
2918 | 2923 |
| |
| |||
2970 | 2975 |
| |
2971 | 2976 |
| |
2972 | 2977 |
| |
2973 |
| - | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
2974 | 2982 |
| |
2975 |
| - | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
2976 | 2987 |
| |
2977 | 2988 |
| |
2978 | 2989 |
| |
|
Lines changed: 24 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
560 | 560 |
| |
561 | 561 |
| |
562 | 562 |
| |
563 |
| - | |
| 563 | + | |
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
| |||
9115 | 9115 |
| |
9116 | 9116 |
| |
9117 | 9117 |
| |
| 9118 | + | |
| 9119 | + | |
| 9120 | + | |
| 9121 | + | |
| 9122 | + | |
| 9123 | + | |
| 9124 | + | |
| 9125 | + | |
| 9126 | + | |
| 9127 | + | |
| 9128 | + | |
| 9129 | + | |
| 9130 | + | |
| 9131 | + | |
| 9132 | + | |
| 9133 | + | |
| 9134 | + | |
| 9135 | + | |
9118 | 9136 |
| |
9119 | 9137 |
| |
9120 | 9138 |
| |
| |||
9151 | 9169 |
| |
9152 | 9170 |
| |
9153 | 9171 |
| |
| 9172 | + | |
| 9173 | + | |
| 9174 | + | |
| 9175 | + | |
| 9176 | + | |
9154 | 9177 |
| |
9155 | 9178 |
| |
9156 | 9179 |
| |
|
Lines changed: 0 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
360 | 360 |
| |
361 | 361 |
| |
362 | 362 |
| |
363 |
| - | |
364 |
| - | |
365 |
| - | |
366 |
| - | |
367 |
| - | |
368 |
| - | |
369 |
| - | |
370 |
| - | |
371 |
| - | |
372 |
| - | |
373 |
| - | |
374 |
| - | |
375 | 363 |
| |
376 | 364 |
| |
377 | 365 |
| |
|
Lines changed: 4 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
87 |
| - | |
| 86 | + | |
| 87 | + | |
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 | 238 |
| |
244 | 239 |
| |
245 | 240 |
| |
| |||
249 | 244 |
| |
250 | 245 |
| |
251 | 246 |
| |
252 |
| - | |
| 247 | + | |
253 | 248 |
| |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
| 249 | + | |
260 | 250 |
| |
261 | 251 |
|
0 commit comments
Comments
(0)