O'Reilly logo

PostgreSQL 9 Administration Cookbook - Second Edition by Simon Riggs, Gianni Ciolli, Hannu Krosing, Gabriele Bartolini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Avoiding transaction wraparound

To many users, transaction wraparound sounds like a disease from space. Mentioning transaction wraparound usually earns the speaker points for technical merit. Let's take a look at it and how to avoid it.

Getting ready

First of all, have you ever seen this 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.

Even worse is 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required