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 1kCmSc-0003q1-2O for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Aug 2020 16:15:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCmSa-0007qq-Vt for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Aug 2020 16:15:08 +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 1kCmSa-0007qi-OT for pgsql-hackers@lists.postgresql.org; Mon, 31 Aug 2020 16:15:08 +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 1kCmST-0002WC-Ig for pgsql-hackers@lists.postgresql.org; Mon, 31 Aug 2020 16:15:08 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kCmSN-00020l-Jq; Mon, 31 Aug 2020 12:14:55 -0400 Date: Mon, 31 Aug 2020 12:14:55 -0400 From: Bruce Momjian To: Tom Lane Cc: Stephen Frost , Andrey Lepikhov , pgsql-hackers@lists.postgresql.org, Etsuro Fujita , Jeff Janes Subject: Re: Ideas about a better API for postgres_fdw remote estimates Message-ID: <20200831161455.GD13613@momjian.us> References: <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> <20200714013219.GD32422@momjian.us> <7a40707d-1758-85a2-7bb1-6e5775518e64@postgrespro.ru> <20200829162231.GE29590@tamriel.snowman.net> <3565504.1598719859@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3565504.1598719859@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Aug 29, 2020 at 12:50:59PM -0400, Tom Lane wrote: > Stephen Frost writes: > > Isn't this going to create a version dependency that we'll need to deal > > with..? What if a newer major version has some kind of improved ANALYZE > > command, in terms of what it looks at or stores, and it's talking to an > > older server? > > Yeah, this proposal is a nonstarter unless it can deal with the remote > server being a different PG version with different stats. > > Years ago (when I was still at Salesforce, IIRC, so ~5 years) we had > some discussions about making it possible for pg_dump and/or pg_upgrade > to propagate stats data forward to the new database. There is at least > one POC patch in the archives for doing that by dumping the stats data > wrapped in a function call, where the target database's version of the > function would be responsible for adapting the data if necessary, or > maybe just discarding it if it couldn't adapt. We seem to have lost > interest but it still seems like something worth pursuing. I'd guess > that if such infrastructure existed it could be helpful for this. I don't think there was enough value to do statistics migration just for pg_upgrade, but doing it for pg_upgrade and FDWs seems like it might have enough demand to justify the required work and maintenance. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee