pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Consider unsorted paths in generate_useful_gather_paths
2+ messages / 1 participants
[nested] [flat]

* pgsql: Consider unsorted paths in generate_useful_gather_paths
@ 2020-12-21 17:28 Tomas Vondra <tomas.vondra@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tomas Vondra @ 2020-12-21 17:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Consider unsorted paths in generate_useful_gather_paths

generate_useful_gather_paths used to skip unsorted paths (without any
pathkeys), but that is unnecessary - the later code actually can handle
such paths just fine by adding a Sort node. This is clearly a thinko,
preventing construction of useful plans.

Backpatch to 13, where Incremental Sort was introduced.

Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13
Discussion: https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com

Branch
------
REL_13_STABLE

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

Modified Files
--------------
src/backend/optimizer/path/allpaths.c          | 11 ++---------
src/test/regress/expected/incremental_sort.out | 13 +++++++++++++
src/test/regress/sql/incremental_sort.sql      |  4 ++++
3 files changed, 19 insertions(+), 9 deletions(-)



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

* pgsql: Consider unsorted paths in generate_useful_gather_paths
@ 2020-12-21 17:29 Tomas Vondra <tomas.vondra@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tomas Vondra @ 2020-12-21 17:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Consider unsorted paths in generate_useful_gather_paths

generate_useful_gather_paths used to skip unsorted paths (without any
pathkeys), but that is unnecessary - the later code actually can handle
such paths just fine by adding a Sort node. This is clearly a thinko,
preventing construction of useful plans.

Backpatch to 13, where Incremental Sort was introduced.

Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13
Discussion: https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/path/allpaths.c          | 11 ++---------
src/test/regress/expected/incremental_sort.out | 13 +++++++++++++
src/test/regress/sql/incremental_sort.sql      |  4 ++++
3 files changed, 19 insertions(+), 9 deletions(-)



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


end of thread, other threads:[~2020-12-21 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 17:28 pgsql: Consider unsorted paths in generate_useful_gather_paths Tomas Vondra <tomas.vondra@postgresql.org>
2020-12-21 17:29 pgsql: Consider unsorted paths in generate_useful_gather_paths 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