Re: why there is not VACUUM FULL CONCURRENTLY?
Euler Taveira <euler@eulerto.com>
From: "Euler Taveira" <euler@eulerto.com>
To: "Antonin Houska" <ah@cybertec.at>
Cc: "Alvaro Herrera" <alvherre@alvh.no-ip.org>,
"Marcos Pegoraro" <marcos@f10.com.br>, "Michael Banck" <mbanck@gmx.net>,
"Junwang Zhao" <zhjwpku@gmail.com>, "Kirill Reshke" <reshkekirill@gmail.com>,
"Pavel Stehule" <pavel.stehule@gmail.com>,
"Michael Paquier" <michael@paquier.xyz>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-04-04T18:21:41Z
Lists: pgsql-hackers
On Fri, Apr 4, 2025, at 1:38 PM, Antonin Houska wrote:
> Euler Taveira <euler@eulerto.com> wrote:
>
> > +
> > + <warning>
> > + <para>
> > + The <command>FULL</command> parameter is deprecated in favor of
> > + <xref linkend="sql-repack"/>.
> > + </para>
> > + </warning>
> > +
> >
> > The warnings, notes, and tips are usually placed *after* the description.
>
> You probably mean the subsecions "Notes on Clustering" and "Notes on
> Resources". I moved them into the "Notes" section.
No. I said that it should be put after the <para> not before.
@@ -98,6 +98,14 @@ VACUUM [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ <re
<varlistentry>
<term><literal>FULL</literal></term>
<listitem>
+
+ <warning>
+ <para>
+ The <command>FULL</command> parameter is deprecated in favor of
+ <xref linkend="sql-repack"/>.
+ </para>
+ </warning>
+
<para>
Selects <quote>full</quote> vacuum, which can reclaim more
space, but takes much longer and exclusively locks the table.
> > + SELECT
> > + S.pid AS pid,
> > + S.datid AS datid,
> > + D.datname AS datname,
> > + S.relid AS relid,
> > + CASE S.param1 WHEN 1 THEN 'REPACK'
> > + END AS command,
> >
> > Do you really need command? IIUC REPACK is the only command that will used by
> > this view. There is no need to differentiate commands here.
>
> REPACK is a regular command, so why shouldn't it have its view? Just like
> CLUSTER has one (pg_stat_progress_cluster).
You missed my point. IIRC the command is relevant in the
pg_stat_progress_cluster because there are multiple commands (CLUSTER, VACUUM
FULL). However, in this new view there will be only one command so it is not
necessary to inform it.
> > + *
> > + * 'cmd' indicates which commands is being executed. REPACK should be the only
> > + * caller of this function in the future.
> >
> > command.
>
> Not sure I understand this comment.
Singular form. ... which command is ...
--
Euler Taveira
EDB https://www.enterprisedb.com/
Commits
-
Add CONCURRENTLY option to REPACK
- 28d534e2ae0a 19 (unreleased) landed
-
Introduce the REPACK command
- ac58465e0618 19 (unreleased) landed
-
Adjust signature of cluster_rel() and its subroutines
- cc811f92bac5 18.0 landed
-
Simplify signature of RewriteTable
- ebd8fc7e47fd 18.0 cited