Re: ANALYZE ONLY

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Michael Harris <harmic@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-08-21T02:37:05Z
Lists: pgsql-hackers
On Tue, Aug 20, 2024 at 6:53 PM David Rowley <dgrowleyml@gmail.com> wrote:
> On Wed, 21 Aug 2024 at 06:41, Robert Haas <robertmhaas@gmail.com> wrote:
> > I like trying to use ONLY somehow.
>
> Do you mean as an ANALYZE command option, i.e. ANALYZE (only) table;
> or as a table modifier like gram.y's extended_relation_expr?

The table modifier idea seems nice to me.

> If we did it as a per-table option, then we'd need to consider what
> should happen if someone did: "VACUUM ONLY parttab;". Probably
> silently doing nothing wouldn't be good. Maybe a warning, akin to
> what's done in:
>
> postgres=# analyze (skip_locked) a;
> WARNING:  skipping analyze of "a" --- lock not available

Perhaps. I'm not sure about this part.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. Add ONLY support for VACUUM and ANALYZE