WARNING: database "dbname" must be vacuumed within 5463629 transactions
HINT: To avoid a database shutdown, execute a database-wide VACUUM in that database.
You might also need to commit or roll back old prepared transactions. VACUUM

I have run vacuumdb --full -h -U postgres dbname It spits out that message galore.

I have checked active queries and there is nothing active.

It is a cluster with many DBs on Linux (postgres 9.5.10) but only this one small DB is giving this warning.

Any suggestion would be helpful.

2 Answers 2


Don't use "--full".

Do you get any messages, other than the one you show, while vacuuming?

What is the output of select datname, age(datfrozenxid) from pg_database;


The DB would not vacuum, dropping the DB made the wrap around vacuum start on all the other DBs and the problem is resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.