Common vacuum and autovacuum problems

In many of the situations where VACUUM and related cleanup, such as VACUUM FULL or CLUSTER, need to happen, such as index bloat and excessive dead tuples taking up disk space, the work involved can be so intensive that administrators decide VACUUM is something to be avoided. This is actually the opposite of what should be concluded. In reality, the answer to most vacuum-related problems is to vacuum more often. This reduces the amount of work done by each individual vacuum, and it promotes earlier reuse of space that keeps table sizes from getting so big in the first place. Do not reach the wrong conclusions from a painful vacuum situation—that almost always means you didn't vacuum often enough, not that ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.