forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3ec8a3b
committed
Fix handling of NULLs when merging BRIN summaries
When merging BRIN summaries, union_tuples() did not correctly update thetarget hasnulls/allnulls flags. When merging all-NULL summary into asummary without any NULL values, the result had both flags set to false(instead of having hasnulls=true).This happened because the code only considered the hasnulls flags,ignoring the possibility the source summary has allnulls=true.Discovered while investigating issues with handling empty BRIN rangesand handling of NULL values, but it's a separate problem (has nothing todo with empty ranges).Fixed by considering both flags on the source summary, and updating thehasnulls flag on the target summary.Backpatch to 11. The bug exists since 9.5 (where BRIN indexes wereintroduced), but those releases are EOL already.Discussion:https://postgr.es/m/9d993d0d-e431-2196-9ccc-0554d0e60154%40enterprisedb.com1 parent0791930 commit3ec8a3b
1 file changed
+9
-1
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1615 | 1615 |
| |
1616 | 1616 |
| |
1617 | 1617 |
| |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
1618 | 1621 |
| |
1619 |
| - | |
| 1622 | + | |
1620 | 1623 |
| |
1621 | 1624 |
| |
1622 | 1625 |
| |
| |||
1628 | 1631 |
| |
1629 | 1632 |
| |
1630 | 1633 |
| |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
1631 | 1638 |
| |
1632 | 1639 |
| |
1633 | 1640 |
| |
1634 | 1641 |
| |
1635 | 1642 |
| |
1636 | 1643 |
| |
| 1644 | + | |
1637 | 1645 |
| |
1638 | 1646 |
| |
1639 | 1647 |
| |
|
0 commit comments
Comments
(0)