Re: Eager aggregation, take 3

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Andy Fan <zhihuifan1213(at)163(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Eager aggregation, take 3
Date: 2024-05-20 08:12:49
Message-ID: CAMbWs49sv_MuOYqqrtmBN_oYf8VSQ2BXDwXaTpJTn_YfwyYdWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Another rebase is needed after d1d286d83c. Also I realized that the
partially_grouped_rel generated by eager aggregation might be dummy,
such as in query:

select count(t2.c) from t t1 join t t2 on t1.b = t2.b where false group by
t1.a;

If somehow we choose this dummy path with a Finalize Agg Path on top of
it as the final cheapest path (a very rare case), we would encounter the
"Aggref found in non-Agg plan node" error. The v7 patch fixes this
issue.

Thanks
Richard

Attachment Content-Type Size
v7-0001-Introduce-RelInfoList-structure.patch application/octet-stream 14.3 KB
v7-0002-Introduce-RelAggInfo-structure-to-store-info-for-grouped-paths.patch application/octet-stream 7.8 KB
v7-0003-Set-up-for-eager-aggregation-by-collecting-needed-infos.patch application/octet-stream 14.3 KB
v7-0004-Implement-functions-that-create-RelAggInfos-if-applicable.patch application/octet-stream 26.2 KB
v7-0005-Implement-functions-that-generate-paths-for-grouped-relations.patch application/octet-stream 13.1 KB
v7-0006-Build-grouped-relations-out-of-base-relations.patch application/octet-stream 9.0 KB
v7-0007-Build-grouped-relations-out-of-join-relations.patch application/octet-stream 25.8 KB
v7-0008-Add-test-cases.patch application/octet-stream 71.5 KB
v7-0009-Add-README.patch application/octet-stream 4.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-05-20 08:16:24 Re: commitfest.postgresql.org is no longer fit for purpose
Previous Message Daniel Gustafsson 2024-05-20 08:03:20 Re: Proposal for Updating CRC32C with AVX-512 Algorithm.