Re: Add enable_presorted_aggregate GUC

2022-12-20 Thread David Rowley
On Fri, 16 Dec 2022 at 12:47, David Rowley wrote: > Normally we add some enable_* GUC to leave an escape hatch when we add > some new feature like this. I likely should have done that when I > added 1349d279, but I didn't and I want to now. > > I mainly just shifted this discussion out of [1] as w

Add enable_presorted_aggregate GUC

2022-12-15 Thread David Rowley
Over on [1] Pavel reports that PG16's performance is slower than PG14's for his ORDER BY aggregate query. This seems to be mainly down to how the costing works for Incremental Sort. Now, ever since 1349d279, the planner will make a plan that's ordered by the GROUP BY clause and add on the path key