Re: why there is not VACUUM FULL CONCURRENTLY?
Antonin Houska <ah@cybertec.at>
From: Antonin Houska <ah@cybertec.at>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Pavel Stehule <pavel.stehule@gmail.com>,
Michael Paquier <michael@paquier.xyz>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-07-31T15:25:45Z
Lists: pgsql-hackers
Kirill Reshke <reshkekirill@gmail.com> wrote: > Also, I was thinking about pg_repack vs pg_squeeze being used for the > VACUUM FULL CONCURRENTLY feature, and I'm a bit suspicious about the > latter. > If I understand correctly, we essentially parse the whole WAL to > obtain info about one particular relation changes. That may be a big > overhead, pg_squeeze is an extension but the logical decoding is performed by the core, so there is no way to ensure that data changes of the "other tables" are not decoded. However, it might be possible if we integrate the functionality into the core. I'll consider doing so in the next version of [1]. > whereas the trigger approach does not suffer from this. So, there is the > chance that VACUUM FULL CONCURRENTLY will never keep up with vacuumed > relation changes. Am I right? Perhaps it can happen, but note that trigger processing is also not free and that in this case the cost is paid by the applications. So while VACUUM FULL CONCURRENTLY (based on logical decoding) might fail to catch-up, the trigger based solution may slow down the applications that execute DML commands while the table is being rewritten. [1] https://commitfest.postgresql.org/49/5117/ -- 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