Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Martijn van Oosterhout <kleptog@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-08-04T01:55:34Z
Lists: pgsql-bugs
Richard Guo <guofenglinux@gmail.com> writes:
> I'm reproducing this bug in HEAD with the repro given by Martijn, but
> with some additional GUC sets:

> set enable_hashjoin to off;
> set enable_mergejoin to off;
> set enable_indexscan to off;
> set enable_bitmapscan to off;

Hm, does not work for me ... although I assume you mean bc76f5ac4
or before?  It should definitely not happen after 1aa8dad41,
unless there's an additional bug ...

			regards, tom lane



Commits

  1. Add proper regression test for the recent SRFs-in-pathkeys problem.

  2. Fix incorrect tests for SRFs in relation_can_be_sorted_early().

  3. Optimize order of GROUP BY keys