]> granicus.if.org Git - postgresql/commit
Fix wrong costing of Sort under Gather Merge.
authorRobert Haas <rhaas@postgresql.org>
Wed, 22 Mar 2017 18:42:03 +0000 (14:42 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 22 Mar 2017 18:45:14 +0000 (14:45 -0400)
commitdc02c7bca4dccf7de278cdc6b3325a829e75b252
tree27944d3e204c2ef613c1a9e7e2b40d5424118d07
parent6b76f1bb58f53aec25cfec76391270ea36ad1170
Fix wrong costing of Sort under Gather Merge.

There's no mechanism for such a sort to become a top-N sort, so we
should pass -1 rather than limit_tuples to cost_sort().

Rushabh Lathia, per a report from Mithun Cy

Discussion: http://postgr.es/m/CAGPqQf1akRcSgC9=6iwx=sEPap9UvPpHJLzg8_N+OuHdb6fL+g@mail.gmail.com
src/backend/optimizer/plan/planner.c