Commit 05b38c7
committed
Fix partitioned index attachment
When an existing index in a partition is attached to a new index on
its parent, we forgot to set the "relispartition" flag correctly, which
meant that it was not possible to find the index in various operations,
such as adding a foreign key constraint that references that partitioned
table. One of four places that was assigning the parent index was
forgetting to do that, so fix by shifting responsibility of updating the
flag to the routine that changes the parent.
Author: Amit Langote, Álvaro Herrera
Reported-by: Hubert "depesz" Lubaczewski
Discussion: https://postgr.es/m/CA+HiwqHMsRtRYRWYTWavKJ8x14AFsv7bmAV46mYwnfD3vy8goQ@mail.gmail.com1 parent c247ae0 commit 05b38c7
File tree
4 files changed
+46
-37
lines changed- src
- backend/commands
- test/regress
- expected
- sql
4 files changed
+46
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
3388 | 3389 | | |
3389 | 3390 | | |
3390 | 3391 | | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
3391 | 3395 | | |
3392 | 3396 | | |
3393 | 3397 | | |
| |||
3424 | 3428 | | |
3425 | 3429 | | |
3426 | 3430 | | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
530 | 528 | | |
531 | 529 | | |
532 | 530 | | |
| |||
15714 | 15712 | | |
15715 | 15713 | | |
15716 | 15714 | | |
15717 | | - | |
15718 | 15715 | | |
15719 | 15716 | | |
15720 | 15717 | | |
| |||
15970 | 15967 | | |
15971 | 15968 | | |
15972 | 15969 | | |
15973 | | - | |
15974 | 15970 | | |
15975 | 15971 | | |
15976 | 15972 | | |
| |||
16268 | 16264 | | |
16269 | 16265 | | |
16270 | 16266 | | |
16271 | | - | |
16272 | 16267 | | |
16273 | 16268 | | |
16274 | 16269 | | |
| |||
16401 | 16396 | | |
16402 | 16397 | | |
16403 | 16398 | | |
16404 | | - | |
16405 | | - | |
16406 | | - | |
16407 | | - | |
16408 | | - | |
16409 | | - | |
16410 | | - | |
16411 | | - | |
16412 | | - | |
16413 | | - | |
16414 | | - | |
16415 | | - | |
16416 | | - | |
16417 | | - | |
16418 | | - | |
16419 | | - | |
16420 | | - | |
16421 | | - | |
16422 | | - | |
16423 | | - | |
16424 | | - | |
16425 | | - | |
16426 | | - | |
16427 | | - | |
16428 | | - | |
16429 | | - | |
16430 | | - | |
16431 | | - | |
16432 | | - | |
16433 | | - | |
16434 | | - | |
16435 | | - | |
16436 | 16399 | | |
16437 | 16400 | | |
16438 | 16401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2367 | 2367 | | |
2368 | 2368 | | |
2369 | 2369 | | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
0 commit comments