Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmqn9-0000Xg-ME for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2023 06:50:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmqn7-0008Fz-W7 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2023 06:50:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmqn7-0008Fq-Mn for pgsql-hackers@lists.postgresql.org; Thu, 13 Apr 2023 06:50:45 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pmqn4-002alk-JI for pgsql-hackers@postgresql.org; Thu, 13 Apr 2023 06:50:45 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1pmqmy-00BdEi-96; Thu, 13 Apr 2023 02:50:36 -0400 Date: Thu, 13 Apr 2023 02:50:36 -0400 From: Bruce Momjian To: "Fujii.Yuki@df.MitsubishiElectric.co.jp" Cc: Andres Freund , Tom Lane , Alexander Pyhalov , Tomas Vondra , PostgreSQL-development , Julien Rouhaud , Daniel Gustafsson , Ilya Gladyshev Subject: Re: Partial aggregates pushdown Message-ID: References: <20221207185943.g3pkqseovvrk2n2e@awork3.anarazel.de> 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 Thu, Apr 13, 2023 at 02:12:44AM -0400, Bruce Momjian wrote: > > In the next version of this patch, > > we can pushdown partial aggregate for an user-defined aggregate function only > > when the function pass through this check. > > Understood. In summary, we don't do any version check for built-in function pushdown, so we don't need it for aggregates either. We check extension functions against the extension pushdown list, so we should be checking this for partial aggregate pushdown, and for partition-wise aggregate pushdown. If we don't do that last check already, it is a bug. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Embrace your flaws. They make you human, rather than perfect, which you will never be.