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-31T14:26:25Z
Lists: pgsql-hackers
Attachments
- v11-0001-Add-REPACK-command.patch (text/x-diff)
Antonin Houska <ah@cybertec.at> wrote: > Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > > On 2025-Mar-22, Antonin Houska wrote: > > > > > 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. > > > > I rebased again, fixing a compiler warning reported by CI and applying > > pgindent to each individual patch. I'm slowly starting to become more > > familiar with the whole of this new code. > > I'm trying to reflect Robert's suggestions about locking [1]. The next version > should be a bit simpler, so maybe wait for it before you continue studying the > code. This is it. A few notes: * Since there's no unlocking during the processing now, the code to check for catalog changes was removed. * Some code moved from 0004 to 0005, where it fits better. (Also the commit messages of these two parts elaborated a bit more.) * Regarding the progress monitoring, I do in 0004 what I proposed in [1]: BeginInternalSubTransaction() now sets a flag that avoids clearing of the progress state in AbortSubTransaction() * Although I consider 0005 (Preserve visibility information of the concurrent data changes.) important, it occurs to me now that it might introduce quite some overhead. * 0003 is new in the series. I thought it'll be needed, then I realized it's not. It might be useful as refactoring though. Please let me know if I should maintain it or drop it. [1] https://www.postgresql.org/message-id/80297.1742989179%40localhost -- 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