pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Repair logic for reordering grouping sets optimization.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Repair logic for reordering grouping sets optimization.
@ 2019-06-30 22:55  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-06-30 22:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Repair logic for reordering grouping sets optimization.

The logic in reorder_grouping_sets to order grouping set elements to
match a pre-specified sort ordering was defective, resulting in
unnecessary sort nodes (though the query output would still be
correct). Repair, simplifying the code a little, and add a test.

Per report from Richard Guo, though I didn't use their patch. Original
bug seems to have been my fault.

Backpatch back to 9.5 where grouping sets were introduced.

Discussion: https://postgr.es/m/CAN_9JTzyjGcUjiBHxLsgqfk7PkdLGXiM=pwM+=ph2LsWw0WO1A@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/plan/planner.c       | 39 ++++++++++++++----------------
src/test/regress/expected/groupingsets.out | 13 ++++++++++
src/test/regress/sql/groupingsets.sql      |  3 +++
3 files changed, 34 insertions(+), 21 deletions(-)



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

* pgsql: Repair logic for reordering grouping sets optimization.
@ 2019-06-30 22:55  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-06-30 22:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Repair logic for reordering grouping sets optimization.

The logic in reorder_grouping_sets to order grouping set elements to
match a pre-specified sort ordering was defective, resulting in
unnecessary sort nodes (though the query output would still be
correct). Repair, simplifying the code a little, and add a test.

Per report from Richard Guo, though I didn't use their patch. Original
bug seems to have been my fault.

Backpatch back to 9.5 where grouping sets were introduced.

Discussion: https://postgr.es/m/CAN_9JTzyjGcUjiBHxLsgqfk7PkdLGXiM=pwM+=ph2LsWw0WO1A@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4a36c77156f2ff6e07a349cddc65e5dd21abc1a8

Modified Files
--------------
src/backend/optimizer/plan/planner.c       | 39 ++++++++++++++----------------
src/test/regress/expected/groupingsets.out | 13 ++++++++++
src/test/regress/sql/groupingsets.sql      |  3 +++
3 files changed, 34 insertions(+), 21 deletions(-)



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

* pgsql: Repair logic for reordering grouping sets optimization.
@ 2019-06-30 22:55  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-06-30 22:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Repair logic for reordering grouping sets optimization.

The logic in reorder_grouping_sets to order grouping set elements to
match a pre-specified sort ordering was defective, resulting in
unnecessary sort nodes (though the query output would still be
correct). Repair, simplifying the code a little, and add a test.

Per report from Richard Guo, though I didn't use their patch. Original
bug seems to have been my fault.

Backpatch back to 9.5 where grouping sets were introduced.

Discussion: https://postgr.es/m/CAN_9JTzyjGcUjiBHxLsgqfk7PkdLGXiM=pwM+=ph2LsWw0WO1A@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/793eb94e31387738c72a8d7d702a6aecc9c5edee

Modified Files
--------------
src/backend/optimizer/plan/planner.c       | 39 ++++++++++++++----------------
src/test/regress/expected/groupingsets.out | 13 ++++++++++
src/test/regress/sql/groupingsets.sql      |  3 +++
3 files changed, 34 insertions(+), 21 deletions(-)



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

* pgsql: Repair logic for reordering grouping sets optimization.
@ 2019-06-30 22:55  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-06-30 22:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Repair logic for reordering grouping sets optimization.

The logic in reorder_grouping_sets to order grouping set elements to
match a pre-specified sort ordering was defective, resulting in
unnecessary sort nodes (though the query output would still be
correct). Repair, simplifying the code a little, and add a test.

Per report from Richard Guo, though I didn't use their patch. Original
bug seems to have been my fault.

Backpatch back to 9.5 where grouping sets were introduced.

Discussion: https://postgr.es/m/CAN_9JTzyjGcUjiBHxLsgqfk7PkdLGXiM=pwM+=ph2LsWw0WO1A@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/05dc5f4767e1c5ed157b2870f05d57f3378302f4

Modified Files
--------------
src/backend/optimizer/plan/planner.c       | 39 ++++++++++++++----------------
src/test/regress/expected/groupingsets.out | 13 ++++++++++
src/test/regress/sql/groupingsets.sql      |  3 +++
3 files changed, 34 insertions(+), 21 deletions(-)



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

* pgsql: Repair logic for reordering grouping sets optimization.
@ 2019-06-30 22:55  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-06-30 22:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Repair logic for reordering grouping sets optimization.

The logic in reorder_grouping_sets to order grouping set elements to
match a pre-specified sort ordering was defective, resulting in
unnecessary sort nodes (though the query output would still be
correct). Repair, simplifying the code a little, and add a test.

Per report from Richard Guo, though I didn't use their patch. Original
bug seems to have been my fault.

Backpatch back to 9.5 where grouping sets were introduced.

Discussion: https://postgr.es/m/CAN_9JTzyjGcUjiBHxLsgqfk7PkdLGXiM=pwM+=ph2LsWw0WO1A@mail.gmail.com

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/optimizer/plan/planner.c       | 39 ++++++++++++++----------------
src/test/regress/expected/groupingsets.out | 13 ++++++++++
src/test/regress/sql/groupingsets.sql      |  3 +++
3 files changed, 34 insertions(+), 21 deletions(-)



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


end of thread, other threads:[~2019-06-30 22:55 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-30 22:55 pgsql: Repair logic for reordering grouping sets optimization. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-06-30 22:55 pgsql: Repair logic for reordering grouping sets optimization. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-06-30 22:55 pgsql: Repair logic for reordering grouping sets optimization. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-06-30 22:55 pgsql: Repair logic for reordering grouping sets optimization. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-06-30 22:55 pgsql: Repair logic for reordering grouping sets optimization. Andrew Gierth <rhodiumtoad@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