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 1watjA-0028wx-0A for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Jun 2026 11:19:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1watj8-001UVi-3C for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Jun 2026 11:19:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1waTUW-00FMoi-0F for pgsql-bugs@lists.postgresql.org; Fri, 19 Jun 2026 07:18:16 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1waTUQ-00000001EUm-413n for pgsql-bugs@lists.postgresql.org; Fri, 19 Jun 2026 07:18:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=3IWPXSuvBjfTwxg7udvYmv+eHkQPlDAq4nrGPSk1aFs=; b=yXs0yBXCuKyYjRqzWKPVBtDkbD 6Qz/yUagQIkQOl68v+TTJi+YwCfRjyCjvt3292nJ0U2Bf136b6yDFtF+vTS12HUGcJOIYlfCqPbDp MMe6sAo3sGbDfF2m57jSdrsa7jCY7KtdOn4ki1YexJFkoDljvmVVN6ryhsIX/m+DEq72541wMvgri nTDuzA2fIbMFAC+rOjD+5cmn4tq5t6RHDSh9v6pHC129CTqSlnRJ2t+tVn+HwAsHLm6YBYzAb7F/n 1neSHWnqd2ukN8t6XLZMK/aQ9jRdZ0uv39sZ4gnolLbHVSO9IlD1Wjg4i1XqHmp09ag+rSHaJ5WzK UexUKSPA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1waTUJ-003KOF-1p for pgsql-bugs@lists.postgresql.org; Fri, 19 Jun 2026 07:18:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waTUI-007ZLz-1I for pgsql-bugs@lists.postgresql.org; Fri, 19 Jun 2026 07:18:02 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: igi@sraoss.co.jp Reply-To: igi@sraoss.co.jp, pgsql-bugs@lists.postgresql.org Date: Fri, 19 Jun 2026 07:17:44 +0000 Message-ID: <19529-c7eb1e7a0b07eae6@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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: =20 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: =E3=83=BBInclude extended statistics data in pg_dump https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3Dc3= 2fb29e9 =E3=83=BBAdd pg_restore_extended_stats() https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3D0e= 80f3f88 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?