forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd80be6f
committed
Fix handling of pg_class.relispartition at swap phase in REINDEX CONCURRENTLY
When cancelling REINDEX CONCURRENTLY after swapping the old and newindexes (for example interruption at step 5), the old index remainsaround and is marked as invalid. The old index should also be manuallydroppable to clean up the parent relation from any invalid indexes stillremaining. For a partition index reindexed, pg_class.relispartition wasnot getting updated, causing the index to not be droppable as DROP INDEXwould look for dependencies in a partition tree, which do not existanymore after the swap phase is done.The fix here is simple: when swapping the old and new indexes, make surethat pg_class.relispartition is correctly switched, similarly to what isdone for the index name.Reported-by: Justin PryzbyAuthor: Michael PaquierDiscussion:https://postgr.es/m/20191015164047.GA22729@telsasoft.comBackpatch-through: 121 parent8b7a0f1 commitd80be6f
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1462 | 1462 |
| |
1463 | 1463 |
| |
1464 | 1464 |
| |
| 1465 | + | |
1465 | 1466 |
| |
1466 | 1467 |
| |
1467 | 1468 |
| |
| |||
1491 | 1492 |
| |
1492 | 1493 |
| |
1493 | 1494 |
| |
1494 |
| - | |
| 1495 | + | |
| 1496 | + | |
1495 | 1497 |
| |
| 1498 | + | |
1496 | 1499 |
| |
1497 | 1500 |
| |
1498 | 1501 |
| |
|
0 commit comments
Comments
(0)