Re: Add enable_groupagg GUC parameter to control GroupAggregate usage

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: Tatsuro Yamada <tatsuro.yamada@ntt.com>
Cc: Tatsuro Yamada <yamatattsu@gmail.com>, David Rowley <dgrowleyml@gmail.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-26T06:26:20Z
Lists: pgsql-hackers
On Thu, Jun 25, 2026 at 6:12 PM Tatsuro Yamada <tatsuro.yamada@ntt.com> wrote:
> It sounds like there are several plan nodes that could be covered by this GUC
> (such as SetOp, sort-based Unique for DISTINCT, semijoin uniqueification,
> and Group nodes). Do you think we should cover all of them before the patch
> would be considered complete enough for commit?

Yeah, I think so.  The v4 patch actually already did that.  You can
find these changes in create_setop_path(), create_unique_path(), and
cost_group().

> I'd be interested to hear your thoughts on how best to proceed, and whether
> dividing the work into smaller pieces would make sense.

It seems that the scope of the regression test changes isn't too
large, so I think keeping them in one patch is fine.

- Richard