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 1pl001-0001Ia-Gk for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Apr 2023 04:16:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pl000-0003Gr-4e for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Apr 2023 04:16:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkzzz-0003Gh-RL for pgsql-hackers@lists.postgresql.org; Sat, 08 Apr 2023 04:16:23 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkzzt-0004bM-Be for pgsql-hackers@postgresql.org; Sat, 08 Apr 2023 04:16:22 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 840F05C00BC; Sat, 8 Apr 2023 00:16:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 08 Apr 2023 00:16:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1680927376; x=1681013776; bh=f8 FDr97a/0QaLZtmvO4cTvxozpL3+sOR731sTyEa3dE=; b=eTE3+d1hdt7R3o+V2K 31FopJgejxTaPF5UaPKOpRRXyxgzIO0eOwtCr/F5zLF8c/rNBANvwab/j9wYJ/YY HtlMAr3PyQ0YKbBt78yQwVOlepedZfIztFG4nncjKpKWTlto0vvKChClzJEfi1gj lyPaIy7JpyyAXZdgkCmm7ZiUbUFSe7+MXHtHOyPNJdfCbK5/eszjM1LzTvi2bDHf uWlONTS1dvLMDhtMFyf91Y3Xg9l52ZUSmIg9nT2LgGWOw3LGQ8oG960FmugJDrPc cNiADNRjGxGU+adBKNVB/YjxlgZdUMZCwbAFYvoAWR/7nMlQdr1w9BaNHgQUGeER DTFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1680927376; x=1681013776; bh=f8FDr97a/0QaL ZtmvO4cTvxozpL3+sOR731sTyEa3dE=; b=ek0BMayH9Glwj1NCf9hLgw+2ijVIp pq2PVnqFE+4Clbdll6Gd1xgxWPvo3GDgCmuHk7wzJsGzI+HrGJWIy2czh1+ZlrrS xFXV8gD9dmwU1plaSqFfE/DVgSxSCNHAYxRI66wwkV63M2WYuPPjY85klTnvoLA5 UiEzDmZ0cngLSFxZnQLCFb5WzfwqIazJfkFzNgXx+2JL7rXlT/LGmWwrj27Isd+Z 3QygWzGHQo19/Bx8unytjksqgVQcvFHTKTmcg5kGbhtiRjckIN0mQmm8/4N10N6x ts5sEk5YOYkn9a4+poaWu0iZIs6GgLJu3Fr1JHm9VulcpoDuTDrxWYqhQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejiedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Apr 2023 00:16:15 -0400 (EDT) Date: Fri, 7 Apr 2023 21:16:14 -0700 From: Andres Freund To: Bruce Momjian Cc: Tom Lane , "Fujii.Yuki@df.MitsubishiElectric.co.jp" , Alexander Pyhalov , Tomas Vondra , PostgreSQL-development , Julien Rouhaud , Daniel Gustafsson , Ilya Gladyshev Subject: Re: Partial aggregates pushdown Message-ID: <20230408041614.wfasmdm46bupbif4@awork3.anarazel.de> References: <3278991.1680918900@sss.pgh.pa.us> <3285493.1680921849@sss.pgh.pa.us> 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 2023-04-07 22:53:53 -0400, Bruce Momjian wrote: > On Fri, Apr 7, 2023 at 10:44:09PM -0400, Tom Lane wrote: > > 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. > > The patch has you assign an option at CREATE AGGREGATE time if it can do > push down, and postgres_fdw checks that. What whitelisting mechanism > are you talking about? async_capable? extensions (string) This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.