pg_dump: Allow pg_dump to dump the statistics for foreign tables.
Fujii Masao <fujii@postgresql.org>
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
| Path | Change | +/− |
|---|---|---|
| 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
- Allow pg_dump --statistics-only to dump foreign table statistics? 10 messages · 2025-06-13 → 2025-06-18