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 1qvm3E-007HMq-RX for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Oct 2023 22:08:32 +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 1qvm3D-0091KZ-GW for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Oct 2023 22:08:31 +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 1qvm3D-0091I4-6V for pgsql-hackers@lists.postgresql.org; Wed, 25 Oct 2023 22:08:31 +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.94.2) (envelope-from ) id 1qvm3A-002J1K-7X for pgsql-hackers@postgresql.org; Wed, 25 Oct 2023 22:08:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; 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=1MN+6Vc7vvDB4F7xAo//hfeeui3IIROTqr1AyU3b9Fc=; b=2BZpT LaZaIGA0g50xCywXeOCz57QVtZDLdxBy4cPd2DfCibxp91FNezRQaJ1YkXdI61k5eKUn/qTCpla0j pDsnIo89BnoSS2nltiPRM8dBARclc6TKr4s9Uy8/skIlV8YXBN6wPsKL0nrFDew3nOXneI4psX3kA SMgIa3Tm6MhAxkfmzqMxv86HorIwCkOLlH9wT4iI6er9g2dLqK5r8buRxrHQNXqldNtSBT4xi3qKQ 2D9p4uUxi9GOfF7dKySe8FRDLCCdydMe5mHZWTVyU1Bm0iGzbL1letDj9Xevg5ugHGmefRJXCQTSs y4LS9/rCMzuU862KCBmBHSUKqLvAQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qvm35-00ETUt-3A; Wed, 25 Oct 2023 18:08:23 -0400 Date: Wed, 25 Oct 2023 18:08:23 -0400 From: Bruce Momjian To: "Fujii.Yuki@df.MitsubishiElectric.co.jp" Cc: PostgreSQL-development , "Finnerty, Jim" , Andres Freund , Tom Lane , Tomas Vondra , Julien Rouhaud , Daniel Gustafsson , Alexander Pyhalov Subject: Re: Partial aggregates pushdown Message-ID: References: <3c97067f40503bd8ebb3659f5daa2ff5@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, Oct 24, 2023 at 12:12:41AM +0000, Fujii.Yuki@df.MitsubishiElectric.co.jp wrote: > Hi Mr.Momjian. > > > Fujii-san, to get this patch closer to finished, can I modify this version of the patch to improve some wording and post an > > updated version you can use for future changes? > Yes, I greatly appreciate your offer. > I would very much appreciate your modifications. I am almost done updating the patch, but I got stuck on how the feature is supposed to work. This documentation sentence is where I got confused: check_partial_aggregate_support (boolean) If this option is false, postgres_fdw assumes that for each built-in aggregate function, the partial aggregate function is defined on the remote server without checking the remote server version. If this option is true, during query planning, postgres_fdw connects to the remote server and checks if the remote server version is older than the local server version. If so, postgres_fdw --> assumes that for each built-in aggregate function, the partial aggregate function is not defined --> on the remote server unless the partial aggregate function and the aggregate --> function match. Otherwise postgres_fdw assumes that for each built-in aggregate function, the partial aggregate function is defined on the remote server. The default is false. What does that marked sentence mean? What is match? Are one or both of these remote? It sounds like you are checking the local aggregate against the remote partial aggregate, but I don't see any code that does this in the patch. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.