Re: analyze-in-stages post upgrade questions

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com>, "Zechman, Derek S" <Derek(dot)S(dot)Zechman(at)snapon(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: analyze-in-stages post upgrade questions
Date: 2025-08-19 14:40:05
Message-ID: CAHGQGwHpA8nJfnX1Tk8CiVRUuZofACUFRHwk-8i=9yHYtmqiTw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Aug 18, 2025 at 3:40 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Mon, 2025-08-18 at 11:38 +0900, Fujii Masao wrote:
> > Thanks! So I've updated the patch based on my earlier comments.
> > Unless there are objections, I'll commit the attached version to master only.
>
> I am fine with your patch.

Thanks for the review!

> One suggestion:
>
> > --- a/doc/src/sgml/ref/vacuumdb.sgml
> > +++ b/doc/src/sgml/ref/vacuumdb.sgml
> > @@ -397,6 +397,15 @@ PostgreSQL documentation
> > Multiple tables can be vacuumed by writing multiple
> > <option>-t</option> switches.
> > </para>
> > + <para>
> > + If no tables are specified with the <option>--table</option> option,
> > + <application>vacuumdb</application> will clean all regular tables
> > + and materialized views in the connected database.
> > + If <option>--analyze-only</option> or
> > + <option>--analyze-in-stages</option> is also specified,
> > + it will analyze all regular tables, partitioned tables,
> > + and materialized views (but not foreign tables).
> > + </para>
>
> I suggest replacing "clean" with "process", since VACUUM does so much more than
> clean up dead tuples.

I see your point. However, since the vacuumdb docs already use "clean"
in several places, I think it's better to keep using "clean" here
for consistency. Thought?

> Concerning backpatching, I voted against, but I suggest that this be backpatched
> to v18. I don't feel very strongly about it though.

As for back-patching, I failed to find a strong reason to apply this change
to v18 over the many other patches that could not be committed before
the feature freeze... Of course if there's broad support for back-patching,
we can certainly revisit it. But for now I'm thinking to commit the patch
to master.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2025-08-19 14:40:47 Re: Why analyze reports 30000 pages and rows scanned. Why not just rows?
Previous Message David Mullineux 2025-08-19 10:17:58 Why analyze reports 30000 pages and rows scanned. Why not just rows?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-08-19 14:46:58 Re: Remove traces of long in dynahash.c
Previous Message Tom Lane 2025-08-19 14:27:09 Re: New commitfest app release on August 19th