Re: Eager aggregation, take 3

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tender Wang <tndrwang(at)gmail(dot)com>, Paul George <p(dot)a(dot)george19(at)gmail(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Eager aggregation, take 3
Date: 2024-12-21 01:05:09
Message-ID: CAMbWs48LXGC-Y63YtzEeM-3f0NUXWCUEMs7XwGzywXTjUNMcxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 17, 2024 at 12:42 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> Attached is the patch rebased on the latest master. It refines the
> theoretical justification for the correctness of this transformation
> in README and commit message. It also adds the check for image
> equality for all grouping keys used in partial aggregation, and fixes
> the issue reported by Jian. It does not yet handle the RLS case
> though.

I've looked at the RLS case. AFAIU we want to prevent any
non-leakproof aggregation functions from being pushed down past
securityQuals. I added a check in create_agg_clause_infos to ensure
that no aggregation is pushed down if securityQuals are present along
with any non-leakproof aggregate functions. I know this might be
overly strict, but for now, I want to focus on the eager aggregation
transformation itself. We can relax this restriction in subsequent
patches after this already large one.

Attached is the latest patch, which also includes some cosmetic
tweaks. I am seeking the possibility of pushing this by the end of
January, so that I can have enough time to react to any bugs before
the feature freeze.

Thanks
Richard

Attachment Content-Type Size
v15-0001-Implement-Eager-Aggregation.patch application/octet-stream 176.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2024-12-21 01:21:55 Re: Bug: mdunlinkfiletag unlinks mainfork seg.0 instead of indicated fork+segment
Previous Message Jeff Davis 2024-12-21 00:16:45 Re: Statistics Import and Export