forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfc057b2
committed
Remove dead code for temporary relations in partition planning
Since recent commit1c7c317, temporary relations cannot be mixed withpermanent relations within the same partition tree, and the same countsfor temporary relations created by other sessions, which the plannersimply discarded. Instead be paranoid and issue an error, as thoseshould be blocked at definition time, at least for now.At the same time, a test case is added to stress what has been movedwhen expand_partitioned_rtentry gets called recursively but bumps on apartitioned relation with no partitions which should be handled the sameway as the non-inheritance case. This code may be reworked in a closefuture, and covering this code path will limit surprises.Reported-by: David RowleyAuthor: David RowleyReviewed-by: Amit Langote, Robert Haas, Michael PaquierDiscussion:https://postgr.es/m/CAKJS1f_HyV1txn_4XSdH5EOhBMYaCwsXyAj6bHXk9gOu4JKsbw@mail.gmail.com1 parent2c059c8 commitfc057b2
File tree
3 files changed
+37
-17
lines changed- src
- backend/optimizer/prep
- test/regress
- expected
- sql
3 files changed
+37
-17
lines changedLines changed: 16 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1681 | 1681 |
| |
1682 | 1682 |
| |
1683 | 1683 |
| |
1684 |
| - | |
1685 | 1684 |
| |
1686 | 1685 |
| |
1687 | 1686 |
| |
| |||
1707 | 1706 |
| |
1708 | 1707 |
| |
1709 | 1708 |
| |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1710 | 1719 |
| |
1711 | 1720 |
| |
1712 | 1721 |
| |
| |||
1715 | 1724 |
| |
1716 | 1725 |
| |
1717 | 1726 |
| |
1718 |
| - | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1719 | 1732 |
| |
1720 |
| - | |
1721 |
| - | |
1722 |
| - | |
1723 |
| - | |
1724 |
| - | |
1725 |
| - | |
1726 |
| - | |
| 1733 | + | |
1727 | 1734 |
| |
1728 | 1735 |
| |
1729 | 1736 |
| |
| |||
1738 | 1745 |
| |
1739 | 1746 |
| |
1740 | 1747 |
| |
1741 |
| - | |
1742 |
| - | |
1743 |
| - | |
1744 |
| - | |
1745 |
| - | |
1746 |
| - | |
1747 |
| - | |
1748 |
| - | |
1749 | 1748 |
| |
1750 | 1749 |
| |
1751 | 1750 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
951 | 951 |
| |
952 | 952 |
| |
953 | 953 |
| |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + |
0 commit comments
Comments
(0)