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: 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-01-31T10:15:24Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > On 2025-Jan-31, Antonin Houska wrote: > > Something that Robert Haas just mentioned to me is handling of row > locks: if concurrent transactions are keeping rows in the original table > locked (especially SELECT FOR KEY SHARE, since that's not considered by > logical decoding at present and it would be possible to break foreign > keys if we just do nothing), them we need these to be "transferred" to > the new table somehow. The current implementation acquires AccessExclusiveLock on the table (supposedly for very short time) so it can swap the table and index files. Once we have that lock, I think the transactions holding the row locks should no longer be running. Or can the row lock "survive" the table lock somehow? -- 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