Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbZQc-002fj3-1f for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Jun 2026 07:50:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbZQZ-004yDX-36 for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Jun 2026 07:50:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbZQZ-004yDN-02 for pgsql-bugs@lists.postgresql.org; Mon, 22 Jun 2026 07:50:43 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wbZQX-00000001YSh-0ijV for pgsql-bugs@lists.postgresql.org; Mon, 22 Jun 2026 07:50:42 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id D4FFE14001CC; Mon, 22 Jun 2026 03:50:39 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Mon, 22 Jun 2026 03:50:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1782114639; x=1782201039; bh=OIgKovkK3Z p5ES9Z6pEsHZ9E1tgwuV/nuU7rGbtH+h0=; b=rXQpWw7MrQqZCdzI4CYXDmqmM7 Cwav2DiDF1RV6ypNLn4y5w1Fzp92PG3M0tKCi4bLoD0mJlBUzhX7e8lOLsKAHNQq AKZFN0v+TZEK4pjNJ7Fetgh8MNg+yE+GeSj4n7Hp8XM04UH9yJKSRksMVV+AGUK9 LClh0WHP1SYiAFs7KyC9Ek0nFtK21wWJV22UA9hg0OYrtxQ80iTpaELAqihC58sj EF34n+///nUTuB7wUMJw9GA1ytsiRpFbxEjEzZ466lV9AQLRccfFheS1CKn7mIub NyTNjLQIWSTEMVM1txTuHGxzNOvPvZgaPobbpF2ZmJIuhS5Q1JAjv5PwAh3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1782114639; x=1782201039; bh=OIgKovkK3Zp5ES9Z6pEsHZ9E1tgwuV/nuU7 rGbtH+h0=; b=Rq54yGRbBQp8VMaKDO4zCUdRQbcNNx9zfaVXWsKANM5u3es958U cg5lOyjmv5iKWzFL5MLzvnVI18ox7ZvRzRdXyIDiL0eGSv9N6La+oFvMgl5s0Es4 urA4nO8Mx2ra4ArGsD4Vp7TqAOG2eliimiScWNWliJYQ5xYivGO8ljhnlPrph9jG y50FU0B1+tNK+0eZ4wKcAjkyF85yzzwK7MKrDz9s7fkWW/+NpWy+jePJrr4CvBUX 7zlMX+K+mRdL4/BW88JPeBYQrghKthHVk90lDRaFEg/o4w7Zoaepsmh1zj/uKXuq sIOpvPcrF0iA8Jw1LBYLh1n61wu3XP6277w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEZcjohs9CjLmYShPHzlv/3XehVxh9zt95xlikQKVTH1436fX2UA6nOFDqp/S5Tk1 oiVXKmaHJUi26Id7O9RENXHE7JFSSjnHTk06X329QW67H5yZFwdFFiayyAYH0WH07CqIws tEv2cwIwkT/CBb1RcZh07ilrZLVV30ZeMdbbKMQs6pwZqwtMoj28mjrDCkRN9S3Lb2Z96Q iTHVQ50gGEMWqPXsZenX8SRAtsQyG9XghQhVgRX4PpHNwQuZ7fe5WR+FX4xGyB7zYCGwy9 KvpN7ve7371FcfMe6Rp8084faHs25Nv0Za9HAHlhkS1I0/UtoriAVTPYCNOF/onW6fGDKS ehS8MOBTsQyvQmLO2Y2QsQgcOzno3w7VbGHJeRbIOnqxE2WuZJqDupMJiph3hrF/+Aw3ws 4AB2Ln3vg1yYgQHvevCkJefp9DzAPLO56roDx4MaLrx2vAdopTlhxaZ1aZXaUf4JXto9qu jv9M5wbO5qdGCPvI5uqX6gnTL90lqyq3M94yHKk5cMZEbGuK2eH6kMhXpQfprPq7qmcGT4 dEWEODgHLghCalheEEUfEDSk1ZsE49pDPxU/cwd4csCFN3iIVxJFJvnxqwoM8DJA+Cm/f4 llwx4OwJcagZlkx8rirMJZI6TpDf4tBsElKiLTJjq1nei+V8Xis3NraoA1Bg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Jun 2026 03:50:38 -0400 (EDT) Date: Mon, 22 Jun 2026 16:50:34 +0900 From: Michael Paquier To: Fujii Masao Cc: igi@sraoss.co.jp, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects Message-ID: References: <19529-c7eb1e7a0b07eae6@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HBa9UT1q4XP980Fa" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --HBa9UT1q4XP980Fa Content-Type: multipart/mixed; boundary="LXPelvPcmWTJBfni" Content-Disposition: inline --LXPelvPcmWTJBfni Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --LXPelvPcmWTJBfni Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=extstats-restore-docs.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index ae1bc14d2f26..0e0d53926af6 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1703,7 +1703,6 @@ CREATE DATABASE foo WITH TEMPLATE template0; When 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 , 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 ensu= re diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall= =2Esgml index 8834b7ec141e..238c87c13f5f 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -893,7 +893,6 @@ exclude database PATTE= RN When is specified, pg_dumpall will include most optimizer statistics in= the resulting dump file. This does not include all statistics, such as - those created explicitly with , custom statistics added by an extension, or statistics collected by the cumulative statistics system. Therefore, it may still be useful to run ANALYZE on each database after restoring from a = dump diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.s= gml index 38ca09b423c3..cc44983a9a8d 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -834,8 +834,7 @@ psql --username=3Dpostgres --file=3Dscript.sql postgres Unless the option is specified, pg_upgrade will transfer most optimizer statistics from the old cluster to the new cluster. This does not transfer - all statistics, such as those created explicitly with - , custom statistics added by + all statistics, such as custom statistics added by an extension, or statistics collected by the cumulative statistics sy= stem. =20 --LXPelvPcmWTJBfni-- --HBa9UT1q4XP980Fa Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmo46UoACgkQnvQgOdby QH1avhAAkw8D0kxtJoiCsmFWhj934xX5BrnIZbHjO8y6cM54MFtbBruWW1/8+PCu hGmZ5WakS0wEPmpjmNH25awFO+X+22HJYZnH+tG/jc+iVHb8ydet1wICDbiJiNWV V8ZXNSm0lC6b3q8XvjECnwPCrG67JrkxUi3wXk2KktB48yCoimpzFuXUyYdJ82Vq U1ZFYrTfGWYrC/ZKgQ24ODpljQYRJDfDl7QGaTzKCxsy3wRc4m+uhuwuK3j/zlqr bZmzLRpi4X/0FiotE2ZxE0WTY2kevs6RfnSDeMnuL73KIYjgl8iZAkAy3Q1vrL0e MKa+78//aIgQbjYl96bdRInhbm7Nj+VJDTzyen1o0A5s2WDsDK4KgEes4ddrYXum Fhgnp5Xw4GTRhAoOqc5skbcIX4p7vG6+/bl50fSw+pTMfhItxhYXRMpAmqqNd7nJ qKcKRpkbGx4QlSlLT+QqRMbCQQ5bKRcc98tFf9IgsFG1l6mjPsMcWdhIGrdPPSho G6/qSqJWBvnRHHyi0gVhRbV30cZ1ky43tSy5ItSc+pv03gNHeGv6vCcKkEK00Rt/ R2bWIQ9Q9oF2kpr3IxihpKpwWN0eiDagoQBAsOOp2cDq/wVd6H8wUKRSufunYeX+ HBBZSG1LsDxA4+Wkcppz5ExykEoLbZWQRhNIUodNmy2MdbbBjGY= =SMUo -----END PGP SIGNATURE----- --HBa9UT1q4XP980Fa--