Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Yugo Nagata <nagata@sraoss.co.jp>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Corey Huinker <corey.huinker@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-22T01:19:32Z
Lists: pgsql-hackers
On Fri, Aug 22, 2025 at 2:23 AM Yugo Nagata <nagata@sraoss.co.jp> wrote:
>
> On Thu, 21 Aug 2025 10:37:10 -0500
> Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> > On Thu, Aug 21, 2025 at 11:29:56AM -0400, Corey Huinker wrote:
> > > On Thu, Aug 21, 2025 at 9:56 AM Nathan Bossart <nathandbossart@gmail.com>
> > > wrote:
> > >> Since we're running out of time for v18, I went ahead and updated the
> > >> patch.  I've also added an open item for this.
> > >
> > > +1 on the fix, works for me.
> >
> > Thanks.  I'll plan on committing this in roughly 24 hours (barring
> > additional feedback).

Thanks a lot!


> Thank you for updating the patch.
> I'm fine with your fixes, both in the test and in the additional change
> for inheritance tables. I had overlooked the latter one.

The patch looks good to me, too.

At first, I just wondered whether vacuumdb --missing-stats-only would work
on older servers, since the patch adds access to the attgenerated column,
which might not exist there. But that's not an issue, because
--missing-stats-only is supported only on servers version 15 or later,
where attgenerated is available.

Regards,

-- 
Fujii Masao



Commits

  1. vacuumdb: Fix --missing-stats-only with virtual generated columns.