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

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Baji Shaik <baji(dot)pgdev(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:25:27
Message-ID: CADkLM=eYUK_v-nK8XhTRufVWw5=oOZjqSNsi859Lh5gp992hzg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 16, 2026 at 1:15 PM Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> On Tue, Jun 16, 2026 at 12:09:00PM -0500, Baji Shaik wrote:
> > v3 attached.
>
> Here is a v4 with an updated commit message and a test case.
>
> --
> nathan
>

I know this is a corner-case of a corner-case, but if " AND s.stainherit
OPERATOR(pg_catalog.=) p.inherited", we might then get a false negative
from a situation like this:

t2 inherits t1
t1 has ineritance stats but somehow not regular stats
t2 dis-inherits from t1, t1 is no longer p.inherited = true, but inherited
stats remain

vacuumdb goes looking for matches, sees that t1 is p.inherited = false,
find the old inherited stat row, not realizing it should have been looking
for a non-inherits row.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-06-16 17:30:26 Re: Vacuum statistics
Previous Message Baji Shaik 2026-06-16 17:23:35 Re: Fix --missing-stats-only false positive for partitioned expression indexes