forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8bca5f9
committed
Prevent reindex of invalid indexes on TOAST tables
Such indexes can only be duplicated leftovers of a previously failedREINDEX CONCURRENTLY command, and a valid equivalent is guaranteed toexist. As toast indexes can only be dropped if invalid, reindexingthese would lead to useless duplicated indexes that can't be droppedanymore, except if the parent relation is dropped.Thanks to Justin Pryzby for reminding that this problem was reportedlong ago during the review of the original patch of REINDEXCONCURRENTLY, but the issue was never addressed.Reported-by: Sergei Kornilov, Justin PryzbyAuthor: Julien RouhaudReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/36712441546604286%40sas1-890ba5c2334a.qloud-c.yandex.netDiscussion:https://postgr.es/m/20200216190835.GA21832@telsasoft.comBackpatch-through: 121 parent4c40b27 commit8bca5f9
File tree
4 files changed
+62
-0
lines changed- src
- backend
- catalog
- commands
- utils/cache
- include/utils
4 files changed
+62
-0
lines changedLines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3497 | 3497 |
| |
3498 | 3498 |
| |
3499 | 3499 |
| |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
3500 | 3511 |
| |
3501 | 3512 |
| |
3502 | 3513 |
| |
| |||
3748 | 3759 |
| |
3749 | 3760 |
| |
3750 | 3761 |
| |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
3751 | 3779 |
| |
3752 | 3780 |
| |
3753 | 3781 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2899 | 2899 |
| |
2900 | 2900 |
| |
2901 | 2901 |
| |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
2902 | 2912 |
| |
2903 | 2913 |
| |
2904 | 2914 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3227 | 3227 |
| |
3228 | 3228 |
| |
3229 | 3229 |
| |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
| 184 | + | |
184 | 185 |
| |
185 | 186 |
| |
186 | 187 |
| |
|
0 commit comments
Comments
(0)