Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tyea1-009Q1Z-ET for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Mar 2025 22:23:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tyeZz-000DQc-Ve for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Mar 2025 22:23:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tyeZz-000DQU-K4 for pgsql-hackers@lists.postgresql.org; Sat, 29 Mar 2025 22:23:03 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tyeZx-001rqO-2O for pgsql-hackers@postgresql.org; Sat, 29 Mar 2025 22:23:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=zU5FOt2v/6wZCP0tNVAtAiXE+efbboRukawtyvUqH7g=; b=EnGXA iu5lYeDRxq8ngFF/1iu+ESvrSgvex9H8QkS6MvQ3xedb+2HRI9Zusvt0KKAViIp7JyDMR5x3mAqJF AVSIgGZlRwnpDIEaEJPavmtSTuWYmLluihI8Y+e7kaLVoaSoUptfwVicBJKGjzY5gIPfFy8KM8F0W mHu+FloeroxFMnFXwxTf1bjoIr3zk858nM+LiDXqTf8DZmzITrKmXPUe5J4HaUPBjaFyHjafdhHTL BlRZwd1tqAGhbHnGh9ulRxVSfJ4miFtzHgpPTmgsbvlatPLsSrcIwo/bIlJyq2hKMB/HhBsXB7II3 EjBSYfshr4HlXYJCiEG44dMjTM/Og==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1tyeZp-003Otr-06; Sat, 29 Mar 2025 18:22:53 -0400 Date: Sat, 29 Mar 2025 18:22:53 -0400 From: Bruce Momjian To: "Fujii.Yuki@df.MitsubishiElectric.co.jp" Cc: Tomas Vondra , Jelte Fennema-Nio , PostgreSQL-development , Robert Haas , Tom Lane , Stephen Frost , Andres Freund , Tomas Vondra , Julien Rouhaud , Daniel Gustafsson , vignesh C , Alexander Pyhalov Subject: Re: Partial aggregates pushdown Message-ID: References: <91f71f11-3431-49ab-95d0-1c5c90be9fb0@vondra.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 28, 2025 at 02:00:44AM +0000, Fujii.Yuki@df.MitsubishiElectric.co.jp wrote: > Hi Bruce, Jelte, hackers. > > I apologize for my late response. > > > From: Jelte Fennema-Nio > > Sent: Thursday, August 8, 2024 8:49 PM > > SUMMARY OF THREAD > > > > The design of patch 0001 is agreed upon by everyone on the thread (so far). This adds the PARTIAL_AGGREGATE label for > > aggregates, which will cause the finalfunc not to run. It also starts using PARTIAL_AGGREGATE for pushdown of > > aggregates in postgres_fdw. In 0001 PARTIAL_AGGREGATE is only supported for aggregates with a non-internal/pseudo > > type as the stype. > > > > The design for patch 0002 is still under debate. This would expand on the functionality added by adding support for > > PARTIAL_AGGREGATE for aggregates with an internal stype. This is done by returning a byte array containing the bytes > > that the serialfunc of the aggregate returns. > > > > A competing proposal for 0002 is to instead change aggregates to not use an internal stype anymore, and create dedicated > > types. The main downside here is that infunc and outfunc would need to be added for text serialization, in addition to the > > binary serialization. An open question is: Can we change the requirements for CREATE TYPE, so that types can be created > > without infunc and outfunc. > > I rebased the patch 0001 and add the documentation to it. Okay, this is too late for PG 18 but I am hopeful we can make progress on this for PG 19. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.