Re: Statistics Import and Export

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Statistics Import and Export
Дата
Msg-id 57e2d0c87d30e9b0dfb80f5b5d6a1a82a2539f10.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Statistics Import and Export  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Statistics Import and Export  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 2024-03-30 at 20:08 -0400, Tom Lane wrote:
> I haven't looked at the details, but I'm really a bit surprised
> by Jeff's assertion that CREATE INDEX destroys statistics on the
> base table.  That seems wrong from here, and maybe something we
> could have it not do.  (I do realize that it recalculates reltuples
> and relpages, but so what?  If it updates those, the results should
> be perfectly accurate.)

In the v15 of the patch I was looking at, "pg_dump -s" included the
statistics. The stats appeared first in the dump, followed by the
CREATE INDEX commands. The latter overwrote the relpages/reltuples set
by the former.

While zeros are the right answers for a schema-only dump, it defeated
the purpose of including relpages/reltuples stats in the dump, and
caused the pg_upgrade TAP test to fail.

You're right that there are a number of ways this could be resolved --
I don't think it's an inherent problem.

Regards,
    Jeff Davis




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Table AM Interface Enhancements
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Statistics Import and Export