forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2e577c9
committed
Remove assertion for ALTER TABLE .. DETACH PARTITION CONCURRENTLY
One code path related to this flavor of ALTER TABLE was checking thatthe relation to detach has to be a normal table or a partitioned table,which would fail if using the command with a different relation kind.Views, sequences and materialized views cannot be part of a partitiontree, so these would cause the command to fail anyway, but the assertionwas triggered. Foreign tables can be part of a partition tree, andagain the assertion would have failed. The simplest solution is just toremove this assertion, so as we get the same failure as thenon-concurrent code path.While on it, add a regression test in postgres_fdw for the concurrentpartition detach of a foreign table, as per a suggestion from AlexanderLakhin.Issue introduced in 71f4c8c.Reported-by: Alexander LakhinAuthor: Michael Paquier, Alexander LakhinReviewed-by: Peter Eisentraut, Kyotaro HoriguchiDiscussion:https://postgr.es/m/17339-a9e09aaf38a3457a@postgresql.orgBackpatch-through: 141 parentcc8b257 commit2e577c9
File tree
3 files changed
+6
-2
lines changed- contrib/postgres_fdw
- expected
- sql
- src/backend/commands
3 files changed
+6
-2
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6485 | 6485 |
| |
6486 | 6486 |
| |
6487 | 6487 |
| |
| 6488 | + | |
| 6489 | + | |
| 6490 | + | |
6488 | 6491 |
| |
6489 | 6492 |
| |
6490 | 6493 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1490 | 1490 |
| |
1491 | 1491 |
| |
1492 | 1492 |
| |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1493 | 1496 |
| |
1494 | 1497 |
| |
1495 | 1498 |
| |
|
Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15013 | 15013 |
| |
15014 | 15014 |
| |
15015 | 15015 |
| |
15016 |
| - | |
15017 |
| - | |
15018 | 15016 |
| |
15019 | 15017 |
| |
15020 | 15018 |
| |
|
0 commit comments
Comments
(0)