pg_dump: Allow pg_dump to dump the statistics for foreign tables.

Fujii Masao <fujii@postgresql.org>

Commit: c2e2589ab969eb802493191c79de844bf7dc3a6e
Author: Fujii Masao <fujii@postgresql.org>
Date: 2025-06-18T05:53:55Z
Releases: 18.0
pg_dump: Allow pg_dump to dump the statistics for foreign tables.

Commit 1fd1bd87101 introduced support for dumping statistics with
pg_dump and pg_dumpall, covering tables, materialized views, and indexes.
However, it overlooked foreign tables, even though functions like
pg_restore_relation_stats() support them.

This commit fixes that oversight by allowing pg_dump and pg_dumpall
to include statistics for foreign tables.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://postgr.es/m/3772e4e4-ef39-4deb-bb76-aa8165f33fb6@oss.nttdata.com

Files

PathChange+/−
doc/src/sgml/ref/pg_dumpall.sgml modified +2 −1
doc/src/sgml/ref/pg_dump.sgml modified +4 −3
src/bin/pg_dump/pg_dump.c modified +3 −1

Documentation touched

Discussion