Commit 126d631
committed
Fix partitioned index creation bug with dropped columns
ALTER INDEX .. ATTACH PARTITION fails if the partitioned table where the
index is defined contains more dropped columns than its partition, with
this message:
ERROR: incorrect attribute map
The cause was that one caller of CompareIndexInfo was passing the number
of attributes of the partition rather than the parent, which confused
the length check. Repair.
This can cause pg_upgrade to fail when used on such a database. Leave
some more objects around after regression tests, so that the case is
detected by pg_upgrade test suite.
Remove some spurious empty lines noticed while looking for other cases
of the same problem.
Discussion: https://postgr.es/m/20190326213924.GA2322@alvherre.pgsql1 parent 53bcf5e commit 126d631
File tree
5 files changed
+11
-3
lines changed- src
- backend
- catalog
- commands
- test/regress
- expected
- sql
5 files changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1850 | 1850 | | |
1851 | 1851 | | |
1852 | 1852 | | |
1853 | | - | |
1854 | 1853 | | |
1855 | 1854 | | |
1856 | 1855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
929 | 928 | | |
930 | 929 | | |
931 | 930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15591 | 15591 | | |
15592 | 15592 | | |
15593 | 15593 | | |
15594 | | - | |
| 15594 | + | |
15595 | 15595 | | |
15596 | 15596 | | |
15597 | 15597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
1414 | 1419 | | |
1415 | 1420 | | |
1416 | 1421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
750 | 755 | | |
751 | 756 | | |
752 | 757 | | |
| |||
0 commit comments