Re: Statistics Import and Export
От | jian he |
---|---|
Тема | Re: Statistics Import and Export |
Дата | |
Msg-id | CACJufxG6K4EAUROhdr0wkzMh5QyFLmdLZeAoh7Vh0-VbuAtHcw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Statistics Import and Export (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: Statistics Import and Export
|
Список | pgsql-hackers |
On Tue, Jan 21, 2025 at 7:31 AM Jeff Davis <pgsql@j-davis.com> wrote: > > On Mon, 2025-01-20 at 16:45 -0500, Corey Huinker wrote: > > > > What I struggle to understand is how that purpose isn't served better > > by statistics being in SECTION_NONE like COMMENTs are, so that they > > are imported immediately after the object that they reference. > > Tom, you expressed the strongest opinions on this point, can you expand > a bit? > > If I understand correctly: > > * We strongly want stats to be exported by default[1]. > > * Adding a SECTION_STATS could work, but would be non-trivial and might > break expectations about the set of sections available[2]. > > * SECTION_NONE doesn't seem right. There would be no way to get the > stats using --section. Also, if there is no section boundary for the > stats, then couldn't they appear in a surprising order? > > * I'm not sure about placing stats in SECTION_POST_DATA. That doesn't > seem terrible to me, but not great either. > index is on SECTION_POST_DATA. To dump all the statistics, we have to go through SECTION_POST_DATA. place it there would be more convenient. Tomas Vondra also mentioned this on [1] [1] https://www.postgresql.org/message-id/bf724b21-914a-4497-84e3-49944f9776f6%40enterprisedb.com > * I'm also not 100% sure about the flags. The default should dump the > stats, of course. And I like the idea of allowing any combination of > schema, data and stats to be exported. But that leaves a wrinkle for -- > data-only, which (as of v38) does not dump stats, because stats are a > third kind of thing. Perhaps stats should be expressed as a subtype of > data somehow, but I'm not sure exactly how. > if we have --data-only, --schema-only, --statistics-only, three options, then --data-only also dump statistics would be unintuitive?
В списке pgsql-hackers по дате отправления: