Re: Statistics Import and Export
От | Jeff Davis |
---|---|
Тема | Re: Statistics Import and Export |
Дата | |
Msg-id | c3bc9b9eab819d9c6077b29588fca333ee2cbd80.camel@j-davis.com обсуждение исходный текст |
Ответ на | Re: Statistics Import and Export (Corey Huinker <corey.huinker@gmail.com>) |
Ответы |
Re: Statistics Import and Export
|
Список | pgsql-hackers |
On Sat, 2024-03-30 at 01:34 -0400, Corey Huinker wrote: > > - 002pg_upgrade.pl now dumps before/after databases with --no- > statistics. I tried to find out why some tables were getting their > relstats either not set, or set and reset, never affecting the > attribute stats. I even tried turning autovacuum off for both > instances, but nothing seemed to change the fact that the same tables > were having their relstats reset. I think I found out why this is happening: a schema-only dump first creates the table, then sets the relstats, then creates indexes. The index creation updates the relstats, but because the dump was schema- only, it overwrites the relstats with zeros. That exposes an interesting dependency, which is that relstats must be set after index creation, otherwise they will be lost -- at least in the case of pg_upgrade. This re-raises the question of whether stats are part of a schema-only dump or not. Did we settle conclusively that they are? Regards, Jeff Davis
В списке pgsql-hackers по дате отправления: