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 1rsxJI-00Ak1l-FJ for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Apr 2024 04:05:44 +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 1rsxJG-0082ZL-Mt for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Apr 2024 04:05:42 +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 1rsxJG-0082Z2-DW for pgsql-hackers@lists.postgresql.org; Sat, 06 Apr 2024 04:05:42 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsxJ9-000t4O-Li for pgsql-hackers@lists.postgresql.org; Sat, 06 Apr 2024 04:05:41 +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 43645SI01798868; Sat, 6 Apr 2024 00:05:28 -0400 From: Tom Lane To: Jeff Davis cc: Corey Huinker , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Matthias van de Meent , Peter Smith , PostgreSQL Hackers , Tomas Vondra Subject: Re: Statistics Import and Export In-reply-to: References: <54f190b6c757da2a33cce811949e9dd9601fcba7.camel@j-davis.com> <1632327b74a734f8c434eb75e824160d2b06a697.camel@j-davis.com> <16412b8b7ae443cb7470006beff3011927048860.camel@j-davis.com> <1b1bd1ec39ab3de09a17bf7b241021067e5bd63c.camel@j-davis.com> <2bce855db8259c5672a09f863a307ca07b967b68.camel@j-davis.com> <5e94c358caedf2a231dd71624c3578db7227a265.camel@j-davis.com> <790773.1711910899@sss.pgh.pa.us> <8bc6ffe1e5abeac0fdde1a83d95409f0463af013.camel@j-davis.com> <1141637.1711994977@sss.pgh.pa.us> <1215956.1711999455@sss.pgh.pa.us> <1321788.1712005745@sss.pgh.pa.us> <1328631.1712008078@sss.pgh.pa.us> <7d37175cd5b56ab04940ed6b5a72354ae90783ee.camel@j-davis.com> <1841621.1712093467@sss.pgh.pa.us> <06286ee47fa4b06b6e7f08da21958d7e35525ed4.camel@j-davis.com> <149855.1712164687@sss.pgh.pa.us> <261289.1712174567@sss.pgh.pa.us> Comments: In-reply-to Jeff Davis message dated "Fri, 05 Apr 2024 20:47:40 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1798866.1712376328.1@sss.pgh.pa.us> Date: Sat, 06 Apr 2024 00:05:28 -0400 Message-ID: <1798867.1712376328@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > Thank you, this has improved a lot and the fundamentals are very close. > I think it could benefit from a bit more time to settle on a few > issues: Yeah ... it feels like we aren't quite going to manage to get this over the line for v17. We could commit with the hope that these last details will get sorted later, but that path inevitably leads to a mess. > 1. SECTION_NONE. Conceptually, stats are more like data, and so > intuitively I would expect this in the SECTION_DATA or > SECTION_POST_DATA. However, the two most important use cases (in my > opinion) don't involve dumping the data: pg_upgrade (data doesn't come > from the dump) and planner simulations/repros. Perhaps the section we > place it in is not a critical decision, but we will need to stick with > it for a long time, and I'm not sure that we have consensus on that > point. I think it'll be a serious, serious error for this not to be SECTION_DATA. Maybe POST_DATA is OK, but even that seems like an implementation compromise not "the way it ought to be". > 2. We changed the stats import function API to be VARIADIC very > recently. After we have a bit of time to think on it, I'm not 100% sure > we will want to stick with that new API. It's not easy to document, > which is something I always like to consider. Perhaps. I think the argument of wanting to be able to salvage something even in the presence of unrecognized stats types is stronger, but I agree this could use more time in the oven. Unlike many other things in this patch, this would be nigh impossible to reconsider later. > 3. The error handling also changed recently to change soft errors (i.e. > type input errors) to warnings. I like this change but I'd need a bit > more time to get comfortable with how this is done, there is not a lot > of precedent for doing this kind of thing. I don't think there's much disagreement that that's the right thing, but yeah there could be bugs or some more to do in this area. regards, tom lane