pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Skip system attributes when applying mvdistinct stats
4+ messages / 1 participants
[nested] [flat]

* pgsql: Skip system attributes when applying mvdistinct stats
@ 2019-11-16 01:34 Tomas Vondra <tomas.vondra@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomas Vondra @ 2019-11-16 01:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d482f7f867b58bbd29f65a4471eca8c5b57a7da0

Modified Files
--------------
src/backend/utils/adt/selfuncs.c        | 19 ++++++++++++++-----
src/test/regress/expected/stats_ext.out |  7 +++++++
src/test/regress/sql/stats_ext.sql      |  3 +++
3 files changed, 24 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Skip system attributes when applying mvdistinct stats
@ 2019-11-16 01:34 Tomas Vondra <tomas.vondra@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomas Vondra @ 2019-11-16 01:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/28555a53cb75d00ed0e73f63a6481b4fffcc3dea

Modified Files
--------------
src/backend/utils/adt/selfuncs.c        | 19 ++++++++++++++-----
src/test/regress/expected/stats_ext.out |  7 +++++++
src/test/regress/sql/stats_ext.sql      |  3 +++
3 files changed, 24 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Skip system attributes when applying mvdistinct stats
@ 2019-11-16 01:34 Tomas Vondra <tomas.vondra@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomas Vondra @ 2019-11-16 01:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/25a9ff6cadbb2099a5f53876d9e29f35a080df43

Modified Files
--------------
src/backend/utils/adt/selfuncs.c        | 19 ++++++++++++++-----
src/test/regress/expected/stats_ext.out | 12 ++++++++++++
src/test/regress/sql/stats_ext.sql      |  4 ++++
3 files changed, 30 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Skip system attributes when applying mvdistinct stats
@ 2019-11-16 01:34 Tomas Vondra <tomas.vondra@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomas Vondra @ 2019-11-16 01:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0b0f281cc0fe383162b170889e79502e21e6b35a

Modified Files
--------------
src/backend/utils/adt/selfuncs.c        | 19 ++++++++++++++-----
src/test/regress/expected/stats_ext.out | 12 ++++++++++++
src/test/regress/sql/stats_ext.sql      |  4 ++++
3 files changed, 30 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-11-16 01:34 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-16 01:34 pgsql: Skip system attributes when applying mvdistinct stats Tomas Vondra <tomas.vondra@postgresql.org>
2019-11-16 01:34 pgsql: Skip system attributes when applying mvdistinct stats Tomas Vondra <tomas.vondra@postgresql.org>
2019-11-16 01:34 pgsql: Skip system attributes when applying mvdistinct stats Tomas Vondra <tomas.vondra@postgresql.org>
2019-11-16 01:34 pgsql: Skip system attributes when applying mvdistinct stats Tomas Vondra <tomas.vondra@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox