Postgres VACUUM taking forever
-
07-02-2021 - |
Frage
I have an specific table that is taking forever o VACUUM.
There are no locks in the DB and even letting it overnight the VACUUM didn't finish.
According to the statistics (ANALYZE works fine) the table has 45GB in size and around 250K rows.
Is there some way to show the current status of the VACUUM and/or improve the way it executes?
Lösung
You can see the progress of vacuum with
select * from pg_stat_progress_vacuum;
Here are some tips for vacuuming large tables
https://medium.com/coding-blocks/optimizing-storage-and-managing-cleanup-in-postgresql-c2fe56d4cf5
You do not have to wait too long for autovacuuming
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit dba.stackexchange