Database Reference
In-Depth Information
Getting ready
First: have you seen the following message?
WARNING: database "postgres" must be vacuumed within XXX 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.
Or even worse, the following message:
ERROR: database is not accepting commands to avoid wraparound data loss in database
"template0"
HINT: Stop the postmaster and use a standalone backend to vacuum that database.
You might also need to commit or roll back old prepared transactions.
If not, then you don't need to do anything apart from normal planned maintenance. Those
messages are reported to users, and they are also written to the server log.
How to do it...
If you have a support provider, now is a good time to call. Don't panic, but technical bravado
can land you in worse situations than in which you already are. Let's continue to describe how
to get out of this.
If you've received the WARNING, then follow both hints. First, let's do the suggested
VACUUM on the appropriate database; it might not be "postgres", so replace the
appropriate database name.
Either run the following:
$ vacuumdb postgres
or use the following:
psql -c "VACUUM" postgres
or use your admin tool to initiate a VACUUM on the appropriate database.
Next, find and follow the recipe, Removing old prepared transactions .
 
Search WWH ::




Custom Search