Commit d482f7f
committed
Skip system attributes when applying mvdistinct stats
When estimating number of distinct groups, we failed to ignore system attributes when matching the group expressions to mvdistinct stats, causing failures like ERROR: negative bitmapset member not allowed Fix that by simply skipping anything that is not a regular attribute. Backpatch to PostgreSQL 10, where the extended stats were introduced. Bug: #16111 Reported-by: Tuomas Leikola Author: Tomas Vondra Backpatch-through: 10 Discussion: https://postgr.es/m/16111-687799584c3a7e73@postgresql.org1 parent 76cbfcd commit d482f7f
File tree
3 files changed
+24
-5
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3582 | 3582 | | |
3583 | 3583 | | |
3584 | 3584 | | |
| 3585 | + | |
3585 | 3586 | | |
3586 | 3587 | | |
3587 | 3588 | | |
3588 | | - | |
3589 | | - | |
3590 | | - | |
3591 | | - | |
3592 | | - | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
3593 | 3598 | | |
3594 | 3599 | | |
3595 | 3600 | | |
| |||
3669 | 3674 | | |
3670 | 3675 | | |
3671 | 3676 | | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
3672 | 3681 | | |
3673 | 3682 | | |
3674 | 3683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
236 | 243 | | |
237 | 244 | | |
238 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
| |||
0 commit comments