Re: REPACK and naming

Junwang Zhao <zhjwpku@gmail.com>

From: Junwang Zhao <zhjwpku@gmail.com>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, PostgreSQL-development <pgsql-hackers@lists.postgresql.org>, Álvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2025-09-17T13:18:23Z
Lists: pgsql-hackers
On Wed, Sep 17, 2025 at 9:01 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
>
>
>
> Em ter., 16 de set. de 2025 às 13:40, Bruce Momjian <bruce@momjian.us> escreveu:
>>
>> I am starting to get worried about the confusing of adding a REPACK
>> command.  We already have a lot of confusion around vacuum and analyze:
>>
>> *  autoanalyze does vacuum and analyze
>> *  VACUUM FULL is much different from VACUUM
>>
>> It seems if we add REPACK as a command, it is somewhere between VACUUM
>> FULL and VACUUM in severity/impact.  Should we be rethinking the naming
>> in this area?
>
> SqlServer has similar feature.
> SHRINK

C++ vector has a shrink_to_fit method which seems to serve a similar purpose.

REPACK or REBUILD looks good to me, COMPACT, on the other hand, feels
more specific to the idea of consolidating free space within a page or block.

>
> best regards,
> Ranier Vilela



-- 
Regards
Junwang Zhao