Re: why there is not VACUUM FULL CONCURRENTLY?
Antonin Houska <ah@cybertec.at>
From: Antonin Houska <ah@cybertec.at>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: 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>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-22T10:14:14Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > I rebased this patch series; here's v09. No substantive changes from v08. > I made sure the tree still compiles after each commit. Thanks. > I did look at 0002 again (and renamed the members of the new struct by > adding a p_ prefix, as well as fixing the references to the old names > that were in a few code comments here and there; I don't think these > changes are "substantive"), and ended up wondering why do we need that > change in the first place. According to the comment where the progress > restore function is called, it's because reorderbuffer.c uses a > subtransaction internally. But I went to look at reorderbuffer.c and > noticed that the subtransaction is only used "when using the SQL > function interface, because that creates a transaction already". So > maybe we should look into making REPACK use reorderbuffer without having > to open a transaction block. Which part of reorderbuffer.c do you mean? ISTM that the use of subransactions is more extensive. At least ReorderBufferImmediateInvalidation() appears to rely on it, which in turn is called by xact_decode(). (I don't claim that saving and restoring the progress state is perfect, but I don't have better idea right now.) -- Antonin Houska Web: https://www.cybertec-postgresql.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