forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5278d0a
committed
Reduce memory used by partitionwise joins
Specifically, this commit reduces the memory consumed by theSpecialJoinInfos that are allocated for child joins intry_partitionwise_join() by freeing them at the end of creating pathsfor each child join.A SpecialJoinInfo allocated for a given child join is a copy of theparent join's SpecialJoinInfo, which contains the translated copiesof the various Relids bitmapsets and semi_rhs_exprs, which is a Listof Nodes. The newly added freeing step frees the struct itself andthe various bitmapsets, but not semi_rhs_exprs, because there's nohandy function to free the memory of Node trees.Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>Reviewed-by: Richard Guo <guofenglinux@gmail.com>Reviewed-by: Amit Langote <amitlangote09@gmail.com>Reviewed-by: Andrey Lepikhov <a.lepikhov@postgrespro.ru>Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>Discussion:https://postgr.es/m/CAExHW5tHqEf3ASVqvFFcghYGPfpy7o3xnvhHwBGbJFMRH8KjNw@mail.gmail.com1 parent619bc23 commit5278d0a
File tree
3 files changed
+42
-2
lines changed- src
- backend/optimizer
- path
- util
- include/nodes
3 files changed
+42
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| |||
1659 | 1660 |
| |
1660 | 1661 |
| |
1661 | 1662 |
| |
| 1663 | + | |
1662 | 1664 |
| |
1663 | 1665 |
| |
1664 | 1666 |
| |
1665 | 1667 |
| |
1666 | 1668 |
| |
1667 | 1669 |
| |
1668 | 1670 |
| |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
1669 | 1674 |
| |
1670 | 1675 |
| |
1671 | 1676 |
| |
| |||
1705 | 1710 |
| |
1706 | 1711 |
| |
1707 | 1712 |
| |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
1708 | 1744 |
| |
1709 | 1745 |
| |
1710 | 1746 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1707 | 1707 |
| |
1708 | 1708 |
| |
1709 | 1709 |
| |
1710 |
| - | |
1711 |
| - | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
1712 | 1713 |
| |
1713 | 1714 |
| |
1714 | 1715 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2856 | 2856 |
| |
2857 | 2857 |
| |
2858 | 2858 |
| |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
2859 | 2862 |
| |
2860 | 2863 |
| |
2861 | 2864 |
| |
|
0 commit comments
Comments
(0)