Re: why there is not VACUUM FULL CONCURRENTLY?

Marcos Pegoraro <marcos@f10.com.br>

From: Marcos Pegoraro <marcos@f10.com.br>
To: Antonin Houska <ah@cybertec.at>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Junwang Zhao <zhjwpku@gmail.com>, Kirill Reshke <reshkekirill@gmail.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-01-10T11:10:57Z
Lists: pgsql-hackers
Em sex., 10 de jan. de 2025 às 06:31, Antonin Houska <ah@cybertec.at>
escreveu:

> Thus I understand Alvaro's objections against VACUUM (FULL, CONCURRENTLY).
>


> Therefore I can imagine adding a new command that acts like VACUUM (FULL,
> CONCURRENTLY), but does not try to be CLUSTER (CONCURRENTL).
>

If VACUUM FULL and CLUSTER do the same, why not have a single command ?

--VACUUM FULL would be
RECREATE TABLE [ CONCURRENTLY ] table_name
--CLUSTER would be
RECREATE TABLE [ CONCURRENTLY ] table_name CLUSTERED [ON index_name]
--Maybe someday reordering fields would be
RECREATE TABLE [ CONCURRENTLY ] table_name CLUSTERED [ON index_name] [USING
FIELDS  (FLD4,FLD5,FLD3,FLD1,FLD2)]

regards
Marcos

Commits

  1. Add CONCURRENTLY option to REPACK

  2. Introduce the REPACK command

  3. Adjust signature of cluster_rel() and its subroutines

  4. Simplify signature of RewriteTable