Re: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects
Re: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Sat, Jun 20, 2026 at 8:19 PM PG Bug reporting form
wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 19529
> Logged by: Igi Izumi
> Email address: igi@sraoss.co.jp
> PostgreSQL version: 19beta1
> Operating system: Rocky Linux 10.2 x86_64
> Description:
>
> The PostgreSQL 19 pg_dump documentation currently states:
> "When --statistics is specified, pg_dump will include most optimizer
> statistics in the resulting dump file. This does not include all statistics,
> such as those created explicitly with CREATE STATISTICS, custom statistics
> added by an extension, or statistics collected by the cumulative statistics
> system. Therefore, it may still be useful to run ANALYZE after restoring
> from a dump file to ensure optimal performance; see Section 24.1.3 and
> Section 24.1.6 for more information."
> https://www.postgresql.org/docs/19/app-pgdump.html
>
> However, PostgreSQL 19 introduced support for restoring extended statistics
> with pg_restore_extended_stats(), and the following commits appear to add
> support for dumping and restoring CREATE STATISTICS data:
>
> ・Include extended statistics data in pg_dump
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c32fb29e9
>
> ・Add pg_restore_extended_stats()
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=0e80f3f88
>
> Because of these changes, it appears that statistics created explicitly with
> CREATE STATISTICS are now handled by pg_dump --statistics, while the
> PostgreSQL 19 documentation still states that they are not included.
>
> Could you please confirm whether the documentation is correct, or whether
> this is a documentation bug?
This looks like a documentation oversight in (maybe) the commit that
added extended statistics support to pg_dump.
I say that because I confirmed that pg_dump --statistics does dump
the extended statistics for table t after running:
CREATE TABLE t (i int, j int);
INSERT INTO t SELECT n, n FROM generate_series(1, 100) n;
CREATE STATISTICS ON i, j FROM t;
ANALYZE t;
Regards,
--
Fujii Masao
Re: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects
On Sun, Jun 21, 2026 at 12:55:34AM +0900, Fujii Masao wrote: > This looks like a documentation oversight in (maybe) the commit that > added extended statistics support to pg_dump. This is a doc oversight. While working on the support of extstats for this release, I have looked at holes like this one in the docs, and did not consider the pattern of a linkend based on sql-createstatistics. The report mentions pg_dump, but we have the same wrong pattern in the doc pages for pg_dumpall and pg_upgrade, leading me to the attached for these three holes. Thoughts? -- Michael
pgsql: pg_locale.c: comment improvements.
От:
Jeff Davis <jdavis@postgresql.org>
Дата:
pg_locale.c: comment improvements. Add missing comments and fix outdated/incorrect comments in pg_locale.c and related files. Suggested-by: Andres Freund Discussion: https://postgr.es/m/v3nniwcrxejmcfvz56xbd22hphprqleuornd6hqkmw2bl7kgmz@cnytz2ee5ltk Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/02a2137c1ae521c09050e3d1614dd5d79c4107db Modified Files -------------- src/backend/utils/adt/pg_locale.c | 88 ++++++++++++++++++++++++------- src/backend/utils/adt/pg_locale_builtin.c | 4 +- src/backend/utils/adt/pg_locale_icu.c | 15 +++--- src/include/utils/pg_locale.h | 6 ++- 4 files changed, 81 insertions(+), 32 deletions(-)