Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top