Re: vacuumdb --missing-stats-only and permission issue - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: vacuumdb --missing-stats-only and permission issue
Date
Msg-id CAHGQGwGamTCXqyX0_dfqGzYU-XzD2+AjbQo=EbsBaYHX6E2tXA@mail.gmail.com
Whole thread Raw
In response to Re: vacuumdb --missing-stats-only and permission issue  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: vacuumdb --missing-stats-only and permission issue
List pgsql-hackers
On Sat, Aug 23, 2025 at 12:00 PM Nathan Bossart
<nathandbossart@gmail.com> wrote:
>
> On Sat, Aug 23, 2025 at 10:59:43AM +0900, Fujii Masao wrote:
> > I tested by creating many tables with make installcheck and running
> > vacuumdb --missing-stats-only on the regression database.
> > Without the patch, the query to find tables to analyze took about 60 ms,
> > but with the patch it took 18 seconds. That seems too slow,
> > so probably we'll need to tune the query?
>
> Hm.  Maybe we should just document that the option requires SELECT
> privileges on pg_statistic and pg_statistic_ext_data (which are restricted
> to superusers by default).  I suspect we have relatively limited
> opportunities for tuning the query, and I'd like to avoid invasive changes
> to v18 at this point.

Yeah, adding a note about the permissions required for --missing-stats-only,
leaving the query unchanged in v18, and revisiting the issue in v19 seems
reasonable given the limited time before the v18 release.

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: vacuumdb --missing-stats-only and permission issue
Next
From: Noah Misch
Date:
Subject: Re: Test instability when pg_dump orders by OID