Re: Allow pg_dump --statistics-only to dump foreign table statistics?

Поиск
Список
Период
Сортировка
Искать

Re: Allow pg_dump --statistics-only to dump foreign table statistics?

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 13 Jun 2025, at 09:19, Fujii Masao  wrote:

> I noticed that pg_restore_relation|attribute_stats() can restore statistics
> for foreign tables, but pg_dump --statistics-only doesn't include them.
> Is there a reason why pg_dump skips statistics for foreign tables?
> Are there any risks or concerns around including them?

That indeed seems like an oversight, and regardless it's unclear to the user
what actually happens.  Question is, since we don't know what's on the other
end do we need a corresponding option to --include-foreign-data to be able to
be selective with statistics?

--
Daniel Gustafsson



Re: Allow pg_dump --statistics-only to dump foreign table statistics?

От:
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Дата:
On Fri, Jun 13, 2025 at 1:19 PM Daniel Gustafsson  wrote:
>
> > On 13 Jun 2025, at 09:19, Fujii Masao  wrote:
>
> > I noticed that pg_restore_relation|attribute_stats() can restore statistics
> > for foreign tables, but pg_dump --statistics-only doesn't include them.
> > Is there a reason why pg_dump skips statistics for foreign tables?
> > Are there any risks or concerns around including them?
>
> That indeed seems like an oversight, and regardless it's unclear to the user
> what actually happens.  Question is, since we don't know what's on the other
> end do we need a corresponding option to --include-foreign-data to be able to
> be selective with statistics?

We include only statistics and no data for regular tables. Shouldn't
we do the same to the foreign tables?

-- 
Best Wishes,
Ashutosh Bapat


FAQ