Re: ANALYZE ONLY

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Melih Mutlu <m.melihmutlu@gmail.com>
Cc: Michael Harris <harmic@gmail.com>, David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>, postgres@jeltef.nl, ilya.evdokimov@tantorlabs.com
Date: 2024-08-30T08:19:12Z
Lists: pgsql-hackers
On Thu, Aug 29, 2024 at 7:31 PM Melih Mutlu <m.melihmutlu@gmail.com> wrote:
>
> Hi Michael,
>
> Michael Harris <harmic@gmail.com>, 23 Ağu 2024 Cum, 13:01 tarihinde şunu yazdı:
>>
>> V2 of the patch is attached.
>
>
> Thanks for updating the patch. I have a few more minor feedbacks.
>
>> -ANALYZE [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ <replaceable class="parameter">table_and_columns</replaceable> [, ...] ]
>> +ANALYZE [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ [ ONLY ] <replaceable class="parameter">table_and_columns</replaceable> [, ...] ]
>
>
> I believe moving "[ ONLY ]" to the definitions of table_and_columns below, as you did with "[ * ]", might be better to be consistent with other places (see [1])
>
>> + if ((options & VACOPT_VACUUM) && is_partitioned_table && ! include_children)
>
>

I think you are right.

ANALYZE [ ( option [, ...] ) ] [ [ ONLY ] table_and_columns [, ...] ]

seems not explain commands like:

ANALYZE ONLY only_parted(a), ONLY only_parted(b);



Commits

  1. Add ONLY support for VACUUM and ANALYZE