Re: Allow pg_dump --statistics-only to dump foreign table statistics?
| От | Nathan Bossart |
|---|---|
| Тема | Re: Allow pg_dump --statistics-only to dump foreign table statistics? |
| Дата | |
| Msg-id | aFCJ5iIEVxrr7JnH@nathan обсуждение исходный текст |
| Ответ на | Re: Allow pg_dump --statistics-only to dump foreign table statistics? (Corey Huinker <corey.huinker@gmail.com>) |
| Ответы |
Re: Allow pg_dump --statistics-only to dump foreign table statistics?
|
| Список | pgsql-hackers |
On Mon, Jun 16, 2025 at 03:39:07PM -0400, Corey Huinker wrote:
> If we aren't exporting stats for foreign tables then that is an oversight,
> the intention always was to fetch all available statistics for all
> relations. I can't offhand think of where we even have the option to
> exclude them.
getRelationStatistics() enumerates the relation kinds:
if ((relkind == RELKIND_RELATION) ||
(relkind == RELKIND_PARTITIONED_TABLE) ||
(relkind == RELKIND_INDEX) ||
(relkind == RELKIND_PARTITIONED_INDEX) ||
(relkind == RELKIND_MATVIEW))
The proposed patch [0] adds RELKIND_FOREIGN_TABLE to this list. That
appears to be the only missing relation kind that ANALYZE handles.
[0] https://postgr.es/m/attachment/177608/v1-0001-pg_dump-Allow-pg_dump-to-dump-the-statistics-for-.patch
--
nathan
В списке pgsql-hackers по дате отправления: