HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

When to run Vacuum Full

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
fullvacuumrunwhen

Problem

Reading the PostgreSQL documentation there is an excerpt that mentions that you should run a VACUUM FULL when there are many row lines.

What percentage of bloat is considered necessary to perform VACUUM FULL? Source

Still on this question. My rows change frequently, probably affecting my indexes.
Because of this constant change should I also run a VACUUM FULL?

Note:
For performance reasons, usually once a week I run a VACUUM for each
table in the database, and after the VACUUM I run an ANALYZE for each
table.
Is there anything else I can do?

Solution

Some cases where I would do VACUUM FULL:

The system is about the run out of disk space and fall over. And that system is dominated by a very bloated table, but without bloated indexes. This should be followed up with some navel gazing about how we get into this mess in the first place.

Or, I fixed what was causing the bloat, now I want to restore the table to a nonbloated state for (hopefully) the last time.

Or, I took over a bloated system, no one from the ancien regime knows why. I want to debloat it and watch it rebloat to make it easier to figure out what is going on.

If you only have bloated indexes, it would be better to REINDEX, not VACUUM FULL. On the most recent versions, this can be done concurrently.

Context

StackExchange Database Administrators Q#302384, answer score: 2

Revisions (0)

No revisions yet.