Re: analyze-in-stages post upgrade questions

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, 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: 2026-08-07 06:31:42
Message-ID: 78551FC8-2FE2-4ADF-933D-E438EA6D9A09@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> On 7 Aug 2026, at 06:30, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> Attached is an updated v3 patch. Barring any objections, I'll commit it.

No objection, v3 LGTM.

> While looking at this, I found one related point. This patch only uses
> ANALYZE ONLY for partitioned tables. However, since v18, plain ANALYZE
> on an inheritance parent also recursively analyzes its inheritance
> children. Therefore, when vacuumdb automatically enumerates both an
> inheritance parent and its child tables, the child tables can still be
> analyzed twice: once via the parent and once as separately selected
> targets.
>
> This seems similar to the partitioned-table issue fixed here, but
> it strikes me as an enhancement rather than a stabilization fix for v19.
> If we decide to address it, I think it would be better targeted at v20.
> Does that sound reasonable?

Agreed, this is v20 material. If we want to do anything for 18/19 it would be
to document this, once the suggested patch for v20 is done it might inform us
whether that would be useful or if we should keep it v20 only.

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2026-08-07 06:44:22 RE: 019_replslot_limit.pl might fail due to checkpoint skipped
Previous Message Peter Smith 2026-08-07 06:11:35 Re: Distinguish publication exclusions in object addresses

Browse pgsql-general by date

  From Date Subject
Previous Message Fujii Masao 2026-08-07 04:30:57 Re: analyze-in-stages post upgrade questions