Re: Fix --missing-stats-only false positive for partitioned expression indexes

From: Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix --missing-stats-only false positive for partitioned expression indexes
Date: 2026-06-16 17:09:00
Message-ID: CA+fm-ROVV=fYNqJOc09MCoA_ckjw=NRjk_2j22_giR55zaSnYw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 16, 2026 at 11:46 AM Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> We could remove the final "AND s.stainherit = p.inherited" in this part of
> the clause, too, right?
>

Right. With NOT p.inherited already restricting this clause to the
non-inherited case, the stainherit filter is redundant since index stats
never have stainherit = true (only leaf indexes accumulate stats,
always with stainherit = false). I verified this holds across
partitioned, inherited, and mixed scenarios. Removed in v3.

v3 attached.

Thanks,
Baji Shaik.

Attachment Content-Type Size
v3-0001-Fix-vacuumdb-missing-stats-only-false-positive-for-p.patch application/octet-stream 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-06-16 17:15:27 Re: Fix --missing-stats-only false positive for partitioned expression indexes
Previous Message Nathan Bossart 2026-06-16 16:46:40 Re: Fix --missing-stats-only false positive for partitioned expression indexes