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

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Allow pg_dump --statistics-only to dump foreign table statistics?
Date: 2025-06-13 07:49:06
Message-ID: BE247745-033C-49C4-A5F0-9119657B0E38@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 13 Jun 2025, at 09:19, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vaibhav Dalvi 2025-06-13 08:08:52 pg_upgrade fails with an error "object doesn't exist"
Previous Message Richard Guo 2025-06-13 07:41:57 Re: Eager aggregation, take 3