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 1q7fDi-0004xV-N1 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 16:44:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7fDh-0005H6-BA for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 16:44:13 +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 1q7fDh-0005Fc-0h for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 16:44:13 +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 1q7fDe-001FhC-5R for pgsql-hackers@postgresql.org; Fri, 09 Jun 2023 16:44:12 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1q7fDX-00HT7O-Qy; Fri, 09 Jun 2023 12:44:03 -0400 Date: Fri, 9 Jun 2023 12:44:03 -0400 From: Bruce Momjian To: "Fujii.Yuki@df.MitsubishiElectric.co.jp" Cc: Alexander Pyhalov , PostgreSQL-development , Andres Freund , Tom Lane , Tomas Vondra , Julien Rouhaud , Daniel Gustafsson , Ilya Gladyshev Subject: Re: Partial aggregates pushdown Message-ID: References: <8ffedecae0d21a3cd93805baf1dcc0de@postgrespro.ru> 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 Tue, Jun 6, 2023 at 03:08:50AM +0000, Fujii.Yuki@df.MitsubishiElectric.co.jp wrote: > > I've seen this message. But introduction of new built-in function will break > > requests to old servers only if this new function is used in the request (this > > means that query changes). However, this patch changes the behavior of old > > queries, which worked prior to update. This seems to be different to me. > > You are right. > However, for now, partial aggregates pushdown is mainly used when using built-in sharding in PostgreSQL. > I believe when using built-in sharding in PostgreSQL, the version of the primary node server and > the version of the remote server will usually be the same. > So I think it would be sufficient to include in the documentation a note about such problem > and a workaround for them. I agree that this feature is designed for built-in sharding, but it is possible people could be using aggregates on partitions backed by foreign tables without sharding. Adding a requirement for non-sharding setups to need PG 17+ servers might be unreasonable. Looking at previous release note incompatibilities, we don't normally change non-administrative functions in a way that causes errors if run on older servers. Based on Alexander's observations, I wonder if we need to re-add the postgres_fdw option to control partial aggregate pushdown, and default it to enabled. If we ever add more function breakage we might need more postgres_fdw options. Fortunately, such changes are rare. Yuki, thank you for writing and updating this patch, and Alexander, thank you for helping with this patch. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.