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
ordered_rel,
cheapest_partial_path,
root->sort_pathkeys,
- limit_tuples);
+ -1.0);
total_groups = cheapest_partial_path->rows *
cheapest_partial_path->parallel_workers;