On Mon, 2025-01-20 at 10:58 -0500, Corey Huinker wrote: > That is where all statistics were previously. Others felt very > strongly that they should be mixed in to SECTION_DATA and > SECTION_POST_DATA.
I believe you are referring to Tom's statement that "it'll be a serious, serious error for [stats] not to be SECTION_DATA". The statement is somewhat softened by the sentence that follows, and slightly more by [2]. But it's pretty clear that SECTION_POST_DATA is, at best, an implementation comprosmise. The reason we need to put some stats in SECTION_POST_DATA is because of the hack to resolve MVs that depend on primary keys by moving the MV into SECTION_POST_DATA. (An MV can depend on a primary key when the query has a GROUP BY that relies on functional dependencies to be valid.) That's a fairly marginal case, and one we might be able to resolve a better way in the future, so I don't think that should drive the design. Reagrding [2] and [3], we might need to reconsider the behavior of the --data-only option. I asked for the v38 behavior out of a sense of consistency and completeness (the ability to express whatever combination of things the user might want). But re-reading those messages, we might want --data-only to include the stats? Regards, Jeff Davis [1] https://www.postgresql.org/message-id/1798867.1712376...@sss.pgh.pa.us [2] https://www.postgresql.org/message-id/3156140.1713817153%40sss.pgh.pa.us [3] https://www.postgresql.org/message-id/3228677.1713844341%40sss.pgh.pa.us