سؤال

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?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى dba.stackexchange
scroll top