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

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only
Date: 2025-08-20 01:42:26
Message-ID: 20250820104226.8ba51e43164cd590b863ce41@sraoss.co.jp
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I found that "vacuumdb --missing-stats-only" always performs ANALYZE
on tables with a virtual generated column, since such columns currently
never have statistics. This seems like an obvious waste, so I've attached
a patch to fix it, ensuring that virtual generated columns are not
regarded as missing statistics.

Regards,
Yugo Nagata

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
0001-Don-t-treat-virtual-generated-columns-as-missing-sta.patch text/x-diff 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-08-20 01:52:10 Re: memory leak in logical WAL sender with pgoutput's cachectx
Previous Message Japin Li 2025-08-20 01:37:30 Re: Standardize LSN-based filename