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 1pkyYw-0003g0-PP for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Apr 2023 02:44:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkyYv-0001gU-Jl for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Apr 2023 02:44:21 +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 1pkyYv-0001gL-AO for pgsql-hackers@lists.postgresql.org; Sat, 08 Apr 2023 02:44:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pkyYs-001Yep-Of for pgsql-hackers@postgresql.org; Sat, 08 Apr 2023 02:44:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3382i9Yq3285494; Fri, 7 Apr 2023 22:44:09 -0400 From: Tom Lane To: Bruce Momjian cc: "Fujii.Yuki@df.MitsubishiElectric.co.jp" , Andres Freund , Alexander Pyhalov , Tomas Vondra , PostgreSQL-development , Julien Rouhaud , Daniel Gustafsson , Ilya Gladyshev Subject: Re: Partial aggregates pushdown In-reply-to: References: <20221207185943.g3pkqseovvrk2n2e@awork3.anarazel.de> <3278991.1680918900@sss.pgh.pa.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 07 Apr 2023 22:34:08 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3285492.1680921849.1@sss.pgh.pa.us> Date: Fri, 07 Apr 2023 22:44:09 -0400 Message-ID: <3285493.1680921849@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian writes: > On Fri, Apr 7, 2023 at 09:55:00PM -0400, Tom Lane wrote: >> Uh, what? Why would we not be able to tell from the remote server's >> version number whether it has this ability? > The issue is not a mismatch of postgres_fdw versions but the extension > versions and whether the partial aggregate functions exist on the remote > side, e.g., something like a PostGIS upgrade. postgres_fdw has no business pushing down calls to non-builtin functions unless the user has explicitly authorized that via the existing whitelisting mechanism. I think you're reinventing the wheel, and not very well. regards, tom lane