We have a postgres database in Amazon RDS. Initially, we needed to load large amount of data quickly, so autovacuum
was turned off according to the best practice suggestion from Amazon. Recently I noticed some performance issue when running queries. Then I realized it has not been vacuumed for a long time. As it turns out many tables have lots of dead tuples.
Surprisingly, even after I manually ran vacuum
commands on some of the tables, it did not seem to remove these dead tuples at all. vacuum full
takes too long to finish which usually ends up timed out after a whole night.
Why does vacuum
command not work? What are my other options, restart the instance?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…