Re: Fix --missing-stats-only false positive for partitioned expression indexes - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Fix --missing-stats-only false positive for partitioned expression indexes
Date
Msg-id CADkLM=cyzq7EsgxG-_DdquZ9XgZkyfBctDn-hqfahTm=qojDnw@mail.gmail.com
Whole thread
In response to Re: Fix --missing-stats-only false positive for partitioned expression indexes  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Tue, Jun 16, 2026 at 12:14 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
On Tue, Jun 16, 2026 at 10:25:52AM -0500, Baji Shaik wrote:
> I tested "vacuumdb --missing-stats-only"  and found that it flags
> partitioned tables that have expression indexes, even after a full
> ANALYZE.

Thanks for reporting.

-                                                        " OR EXISTS (SELECT NULL FROM pg_catalog.pg_attribute a\n"
+                                                        " OR (NOT p.inherited"
+                                                        " AND EXISTS (SELECT NULL FROM pg_catalog.pg_attribute a\n"

I'm curious why you added this check to the beginning and surrounded the
rest with parentheses.  Wouldn't it be better to follow the example of the
surrounding clauses and an "AND NOT p.inherited" somewhere in the middle?

--
nathan

I had a similar question and am toying around with refactoring it now.

The rest of the patch checks out aside from that.


 

pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: mxid_score can become Infinity in pg_stat_autovacuum_scores
Next
From: Tom Lane
Date:
Subject: Re: Improving the names generated for indexes on expressions