From: Nathan Bossart <nathandbossart@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: John Naylor <johncnaylorls@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: jian he <jian.universality@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: alvherre@alvh.no-ip.org <alvherre@alvh.no-ip.org>
Subject: Re: vacuumdb changes for stats import/export
Date: Wed, 30 Jul 2025 12:21:08 -0500
Message-ID: <aIpUhBLeWnZf_IBt@nathan> (raw)
In-Reply-To: <aIfFinYmZuCIp_qw@nathan>
References: <4b94ca16-7a6d-4581-b2aa-4ea79dbc082a@dalibo.com>
<aITkuWC4Ww88GsFL@momjian.us>
<CAKFQuwa2-oW__J7gAcVKgZnx658qBx9GknwL-wqX_0VvDc1EBQ@mail.gmail.com>
<aIT9HMuQNIFfIlFH@momjian.us>
<CADkLM=f9eYO_2f2LEf9a2zR_Zw9a4LtVAeqC_TdQEJdTuR-V+Q@mail.gmail.com>
<8320fa2e-9200-46e2-b905-4a4d84707020@dalibo.com>
<aIeNeo-zGgevViNc@nathan>
<b527f417-b27c-43bb-8623-4c703fc0ad72@dalibo.com>
<CAKFQuwYzgRbRBH6T+QZ=Cioy5rLB4mJDZUH2CjMebpFBDKuC_g@mail.gmail.com>
<aIfFinYmZuCIp_qw@nathan>
On Mon, Jul 28, 2025 at 01:46:34PM -0500, Nathan Bossart wrote:
> On Mon, Jul 28, 2025 at 09:22:29AM -0700, David G. Johnston wrote:
>> On Monday, July 28, 2025, Frédéric Yhuel <frederic.yhuel@dalibo.com> wrote:
>>> On 7/28/25 16:47, Nathan Bossart wrote:
>>>> Obviously, this wording isn't clear enough. We might need to either
>>>> remove that sentence or add "When used in conjunction with
>>>> --analyze-in-stages..."
>>>
>>> I vote for the second option.
>>
>> Makes sense.
>
> It seems like there is some support for adding "When used in conjunction
> with --analyze in stages..." to the beginning of the sentence. I'll give
> it another day or two for any further discussion before committing.
Here is what I have staged for commit.
--
nathan
Attachments:v1-0001-doc-Adjust-documentation-for-vacuumdb-missing-sta.patch (text/plain, 2.0K) download
From 82117acd6132351c368ec2670c4ba7f481d69ff9 Mon Sep 17 00:00:00 2001
From: Nathan Bossart <nathan@postgresql.org>
Date: Wed, 30 Jul 2025 12:13:30 -0500
Subject: [PATCH v1 1/1] doc: Adjust documentation for vacuumdb
--missing-stats-only.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The sentence in question gave readers the impression that vacuumdb
deletes existing statistics for a period of time while analyzing,
but it's actually meant to convey that --analyze-in-stages will
temporarily replace existing statistics with ones generated with
lower statistics targets.
Reported-by: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Reviewed-by: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Reviewed-by: "David G. Johnston" <david.g.johnston@gmail.com>
Discussion: https://postgr.es/m/4b94ca16-7a6d-4581-b2aa-4ea79dbc082a%40dalibo.com
Backpatch-through: 18
---
doc/src/sgml/ref/vacuumdb.sgml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgmlindex b0680a61814..c7d9dca17b8 100644--- a/doc/src/sgml/ref/vacuumdb.sgml+++ b/doc/src/sgml/ref/vacuumdb.sgml@@ -282,9 +282,11 @@ PostgreSQL documentation
<listitem>
<para>
Only analyze relations that are missing statistics for a column, index
- expression, or extended statistics object. This option prevents- <application>vacuumdb</application> from deleting existing statistics- so that the query optimizer's choices do not become transiently worse.+ expression, or extended statistics object. When used with+ <option>--analyze-in-stages</option>, this option prevents+ <application>vacuumdb</application> from temporarily replacing existing+ statistics with ones generated with lower statistics targets, thus+ avoiding transiently worse query optimizer choices.
</para>
<para>
This option can only be used in conjunction with
--
2.39.5 (Apple Git-154)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, david.g.johnston@gmail.com, frederic.yhuel@dalibo.com, corey.huinker@gmail.com, bruce@momjian.us, johncnaylorls@gmail.com, sawada.mshk@gmail.com, pgsql@j-davis.com, jian.universality@gmail.com, boekewurm+postgres@gmail.com, tgl@sss.pgh.pa.us, magnus@hagander.net, sfrost@snowman.net, ashutosh.bapat.oss@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org, alvherre@alvh.no-ip.org
Subject: Re: vacuumdb changes for stats import/export
In-Reply-To: <aIpUhBLeWnZf_IBt@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox