forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0b48f13
committed
Fix assertion failure with ALTER TABLE ATTACH PARTITION and indexes
Using ALTER TABLE ATTACH PARTITION causes an assertion failure whenattempting to work on a partitioned index, because partitioned indexescannot have partition bounds.The grammar of ALTER TABLE ATTACH PARTITION requires partition bounds,but not ALTER INDEX, so mixing ALTER TABLE with partitioned indexes isconfusing. Hence, on HEAD, prevent ALTER TABLE to attach a partition ifthe relation involved is a partitioned index. On back-branches, asapplications may rely on the existing behavior, just remove theculprit assertion.Reported-by: Alexander LakhinAuthor: Amit Langote, Michael PaquierDiscussion:https://postgr.es/m/16276-5cd1dcc8fb8be7b5@postgresql.orgBackpatch-through: 111 parent54a4f52 commit0b48f13
File tree
3 files changed
+37
-2
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+37
-2
lines changedLines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3698 | 3698 |
| |
3699 | 3699 |
| |
3700 | 3700 |
| |
3701 |
| - | |
3702 |
| - | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
3703 | 3711 |
| |
3704 | 3712 |
| |
3705 | 3713 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
124 | 141 |
| |
125 | 142 |
| |
126 | 143 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 |
| |
67 | 77 |
| |
68 | 78 |
| |
|
0 commit comments
Comments
(0)