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 1jv9o2-0002gs-KX for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jul 2020 01:32:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jv9o1-0004v8-JD for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jul 2020 01:32:25 +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 1jv9o1-0004v1-Cf for pgsql-hackers@lists.postgresql.org; Tue, 14 Jul 2020 01:32:25 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jv9ny-0001p7-MA for pgsql-hackers@lists.postgresql.org; Tue, 14 Jul 2020 01:32:24 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jv9nv-0002X3-4X; Mon, 13 Jul 2020 21:32:19 -0400 Date: Mon, 13 Jul 2020 21:32:19 -0400 From: Bruce Momjian To: Stephen Frost Cc: Tom Lane , pgsql-hackers@lists.postgresql.org, Etsuro Fujita , Jeff Janes Subject: Re: Ideas about a better API for postgres_fdw remote estimates Message-ID: <20200714013219.GD32422@momjian.us> References: <1155731.1593832096@sss.pgh.pa.us> <20200705170601.GD3125@tamriel.snowman.net> <1301903.1593970603@sss.pgh.pa.us> <20200705174817.GE3125@tamriel.snowman.net> <1309399.1593980722@sss.pgh.pa.us> <20200706141114.GF3125@tamriel.snowman.net> <1374896.1594047946@sss.pgh.pa.us> <20200706152828.GG3125@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706152828.GG3125@tamriel.snowman.net> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jul 6, 2020 at 11:28:28AM -0400, Stephen Frost wrote: > > Yeah, thinking about it as a function that inspects partial planner > > results, it might be useful for other purposes besides postgres_fdw. > > As I said before, I don't think this necessarily has to be bundled as > > part of postgres_fdw. That still doesn't make it part of EXPLAIN. > > Providing it as a function rather than through EXPLAIN does make a bit > more sense if we're going to skip things like the lookups you mention > above. I'm still inclined to have it be a part of core rather than > having it as postgres_fdw though. I'm not completely against it being > part of postgres_fdw... but I would think that would really be > appropriate if it's actually using something in postgres_fdw, but if > everything that it's doing is part of core and nothing related > specifically to the postgres FDW, then having it as part of core makes > more sense to me. Also, having it as part of core would make it more > appropriate for other tools to look at and adding that kind of > inspection capability for partial planner results could be very > interesting for tools like pgAdmin and such. I agree the statistics extraction should probably be part of core. There is the goal if FDWs returning data, and returning the data quickly. I think we can require all-new FDW servers to get improved performance. I am not even clear if we have a full understanding of the performance characteristics of FDWs yet. I know Tomas did some research on its DML behavior, but other than that, I haven't seen much. On a related note, I have wished to be able to see all the costs associated with plans not chosen, and I think others would like that as well. Getting multiple costs for a query goes in that direction. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee