forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1752e35
committed
Fix parallel restore of FKs to partitioned tables
When an FK constraint is created, it needs the index on the referencedtable to exist and be valid. When doing parallel pg_restore and thereferenced table was partitioned, this condition can sometimes not bemet, because pg_dump didn't emit sufficient object dependencies toensure so; this means that parallel pg_restore would fail in certainconditions. Fix by having pg_dump make the FK constraint objectdependent on the partition attachment objects for the constraint'sreferenced index.This has been broken sincef56f8f8, so backpatch to Postgres 12.Discussion:https://postgr.es/m/20191005224333.GA9738@alvherre.pgsql1 parent3c8c55d commit1752e35
File tree
5 files changed
+82
-5
lines changed- src
- bin/pg_dump
- fe_utils
- include/fe_utils
5 files changed
+82
-5
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
412 | 412 |
| |
413 | 413 |
| |
414 | 414 |
| |
| 415 | + | |
| 416 | + | |
| 417 | + | |
415 | 418 |
| |
416 | 419 |
| |
417 | 420 |
| |
|
Lines changed: 40 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7115 | 7115 |
| |
7116 | 7116 |
| |
7117 | 7117 |
| |
| 7118 | + | |
7118 | 7119 |
| |
7119 | 7120 |
| |
7120 | 7121 |
| |
| |||
7256 | 7257 |
| |
7257 | 7258 |
| |
7258 | 7259 |
| |
| 7260 | + | |
7259 | 7261 |
| |
7260 | 7262 |
| |
7261 | 7263 |
| |
| |||
7281 | 7283 |
| |
7282 | 7284 |
| |
7283 | 7285 |
| |
7284 |
| - | |
| 7286 | + | |
7285 | 7287 |
| |
7286 | 7288 |
| |
7287 | 7289 |
| |
| |||
7290 | 7292 |
| |
7291 | 7293 |
| |
7292 | 7294 |
| |
7293 |
| - | |
| 7295 | + | |
7294 | 7296 |
| |
7295 | 7297 |
| |
7296 | 7298 |
| |
| |||
7304 | 7306 |
| |
7305 | 7307 |
| |
7306 | 7308 |
| |
| 7309 | + | |
7307 | 7310 |
| |
7308 | 7311 |
| |
7309 | 7312 |
| |
7310 | 7313 |
| |
7311 | 7314 |
| |
7312 | 7315 |
| |
| 7316 | + | |
| 7317 | + | |
7313 | 7318 |
| |
7314 | 7319 |
| |
7315 | 7320 |
| |
| |||
7326 | 7331 |
| |
7327 | 7332 |
| |
7328 | 7333 |
| |
| 7334 | + | |
| 7335 | + | |
| 7336 | + | |
| 7337 | + | |
| 7338 | + | |
| 7339 | + | |
| 7340 | + | |
| 7341 | + | |
| 7342 | + | |
| 7343 | + | |
| 7344 | + | |
| 7345 | + | |
| 7346 | + | |
| 7347 | + | |
| 7348 | + | |
| 7349 | + | |
| 7350 | + | |
| 7351 | + | |
| 7352 | + | |
| 7353 | + | |
| 7354 | + | |
| 7355 | + | |
| 7356 | + | |
| 7357 | + | |
| 7358 | + | |
| 7359 | + | |
| 7360 | + | |
| 7361 | + | |
| 7362 | + | |
| 7363 | + | |
| 7364 | + | |
| 7365 | + | |
| 7366 | + | |
7329 | 7367 |
| |
7330 | 7368 |
| |
7331 | 7369 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
367 | 367 |
| |
368 | 368 |
| |
369 | 369 |
| |
| 370 | + | |
| 371 | + | |
370 | 372 |
| |
371 | 373 |
| |
372 | 374 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + |
Lines changed: 16 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
6 |
| - | |
7 |
| - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
46 | 57 |
| |
47 | 58 |
| |
48 | 59 |
| |
| |||
54 | 65 |
| |
55 | 66 |
| |
56 | 67 |
| |
| 68 | + | |
| 69 | + | |
57 | 70 |
|
0 commit comments
Comments
(0)