Platform Heroku PG version 13
I have a very busy database and it is reaching near transaction wrap around.
At this point I really want to do the vacuum manually. My question is that if I do manual vacuuming of individual tables then I can see that the txid restores to its minimum value. But the global txid is not changed.
Is the individual vacuuming of tables enough ? Do I still have to do vacuum database ?
CodePudding user response:
Yes, a manual VACUUM
of individual tables will do the trick.
Look at the relfrozenxid
and relminmxid
columns in the pg_class
entries for that database. Find the oldest ones. One or more of these should be equal to datfrozenxid
and datminmxid
in pg_database
. If you VACUUM
those tables, the values for the database should advance.