Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Martijn van Oosterhout <kleptog@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-08-04T03:16:42Z
Lists: pgsql-bugs
Attachments
- v1-0001-Test-we-disallow-pushing-down-SRF-pathkeys.patch (application/octet-stream) patch v1-0001
On Thu, Aug 4, 2022 at 9:55 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > 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 ... Yeah, I tested in bc76f5ac4. Attached is a regression test I composed. I tested it locally and it can catch this bug before 1aa8dad41 and give the expected answer after 1aa8dad41. Thanks Richard
Commits
-
Add proper regression test for the recent SRFs-in-pathkeys problem.
- cc116479917b 16.0 landed
- 8d38ccafca93 13.8 landed
- 1a9ac84923b8 14.5 landed
- 11e7d626cee4 15.0 landed
-
Fix incorrect tests for SRFs in relation_can_be_sorted_early().
- da4ed7588132 13.8 landed
- 445b9020c97f 14.5 landed
- 1aa8dad41ffa 16.0 landed
- 14168d57bb91 15.0 landed
-
Optimize order of GROUP BY keys
- db0d67db2401 15.0 cited