- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit2759924
committed
Fix runtime partition pruning for HASH partitioned tables
This could only affect HASH partitioned tables with at least 2 partitionkey columns.If partition pruning was delayed until execution and the query containedan IS NULL qual on one of the partitioned keys, and some subsequentpartitioned key was being compared to a non-Const, then this could resultin a crash due to the incorrect keyno being used to calculate thestateidx for the expression evaluation code.Here we fix this by properly skipping partitioned keys which have anullkey set. Effectively, this must be the same as what's going oninside perform_pruning_base_step().Sergei Glukhov also provided a patch, but that's not what's being usedhere.Reported-by: Sergei GlukhovReviewed-by: tender wang, Sergei GlukhovDiscussion:https://postgr.es/m/d05b26fa-af54-27e1-f693-6c31590802fa@postgrespro.ruBackpatch-through: 11, where runtime partition pruning was added.1 parent8f1d44b commit2759924
1 file changed
+17
-12
lines changedLines changed: 17 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1673 | 1673 |
| |
1674 | 1674 |
| |
1675 | 1675 |
| |
1676 |
| - | |
| 1676 | + | |
1677 | 1677 |
| |
1678 | 1678 |
| |
1679 | 1679 |
| |
| |||
1682 | 1682 |
| |
1683 | 1683 |
| |
1684 | 1684 |
| |
1685 |
| - | |
1686 |
| - | |
| 1685 | + | |
1687 | 1686 |
| |
1688 |
| - | |
| 1687 | + | |
| 1688 | + | |
1689 | 1689 |
| |
1690 |
| - | |
1691 |
| - | |
| 1690 | + | |
1692 | 1691 |
| |
1693 |
| - | |
1694 |
| - | |
1695 |
| - | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
1696 | 1700 |
| |
1697 |
| - | |
1698 |
| - | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
1699 | 1705 |
| |
1700 |
| - | |
1701 | 1706 |
| |
1702 | 1707 |
| |
1703 | 1708 |
| |
|
0 commit comments
Comments
(0)