forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3a58c5f
committed
Fix dependency handling of column drop with partitioned tables
When dropping a column on a partitioned table which has one or morepartitioned indexes, the operation was failing as dependencies withpartitioned indexes using the column dropped were not getting removed ina way consistent with the columns involved across all the relations partof an inheritance tree.This commit refactors the code executing column drop so as all thecolumns from an inheritance tree to remove are gathered first, anddropped all at the end. This way, we let the dependency machinery sortout by itself the deletion of all the columns with the partitionedindexes across a partition tree.This issue has been introduced by1d92a0c, so backpatch down toREL_12_STABLE.Author: Amit Langote, Michael PaquierReviewed-by: Álvaro Herrera, Ashutosh SharmaDiscussion:https://postgr.es/m/CA+HiwqE9kuBsZ3b5pob2-cvE8ofzPWs-og+g8bKKGnu6b4-yTQ@mail.gmail.comBackpatch-through: 121 parent3fb14cf commit3a58c5f
File tree
3 files changed
+113
-10
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+113
-10
lines changedLines changed: 31 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
404 |
| - | |
| 404 | + | |
| 405 | + | |
405 | 406 |
| |
406 | 407 |
| |
407 | 408 |
| |
| |||
4276 | 4277 |
| |
4277 | 4278 |
| |
4278 | 4279 |
| |
4279 |
| - | |
| 4280 | + | |
| 4281 | + | |
4280 | 4282 |
| |
4281 | 4283 |
| |
4282 | 4284 |
| |
4283 | 4285 |
| |
4284 |
| - | |
| 4286 | + | |
| 4287 | + | |
4285 | 4288 |
| |
4286 | 4289 |
| |
4287 | 4290 |
| |
| |||
7016 | 7019 |
| |
7017 | 7020 |
| |
7018 | 7021 |
| |
7019 |
| - | |
| 7022 | + | |
| 7023 | + | |
| 7024 | + | |
| 7025 | + | |
| 7026 | + | |
| 7027 | + | |
| 7028 | + | |
| 7029 | + | |
| 7030 | + | |
7020 | 7031 |
| |
7021 | 7032 |
| |
7022 | 7033 |
| |
7023 | 7034 |
| |
7024 | 7035 |
| |
7025 |
| - | |
| 7036 | + | |
| 7037 | + | |
7026 | 7038 |
| |
7027 | 7039 |
| |
7028 | 7040 |
| |
| |||
7035 | 7047 |
| |
7036 | 7048 |
| |
7037 | 7049 |
| |
| 7050 | + | |
| 7051 | + | |
| 7052 | + | |
| 7053 | + | |
| 7054 | + | |
7038 | 7055 |
| |
7039 | 7056 |
| |
7040 | 7057 |
| |
| |||
7147 | 7164 |
| |
7148 | 7165 |
| |
7149 | 7166 |
| |
7150 |
| - | |
| 7167 | + | |
7151 | 7168 |
| |
7152 | 7169 |
| |
7153 | 7170 |
| |
| |||
7183 | 7200 |
| |
7184 | 7201 |
| |
7185 | 7202 |
| |
7186 |
| - | |
7187 |
| - | |
7188 |
| - | |
| 7203 | + | |
7189 | 7204 |
| |
7190 | 7205 |
| |
7191 | 7206 |
| |
| 7207 | + | |
7192 | 7208 |
| |
7193 |
| - | |
| 7209 | + | |
| 7210 | + | |
| 7211 | + | |
| 7212 | + | |
| 7213 | + | |
| 7214 | + | |
7194 | 7215 |
| |
7195 | 7216 |
| |
7196 | 7217 |
| |
|
Lines changed: 61 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1258 | 1258 |
| |
1259 | 1259 |
| |
1260 | 1260 |
| |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + |
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
703 | 703 |
| |
704 | 704 |
| |
705 | 705 |
| |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + |
0 commit comments
Comments
(0)