-
+
Routine Database Maintenance Tasks
There are two variants of the VACUUM
command. The first form, known as lazy vacuum
or
- just VACUUM, marks expired data in tables and
+ just VACUUM, marks dead data in tables and
indexes for future reuse; it does not attempt
- to reclaim the space used by this expired data unless the space is
+ to reclaim the space used by this dead data unless the space is
at the end of the table and an exclusive table lock can be easily
obtained. Unused space at the start or middle of the file does
not result in the file being shortened and space returned to the
The second form is the VACUUM FULL
command. This uses a more aggressive algorithm for reclaiming the
- space consumed by expired row versions. Any space that is freed by
+ space consumed by dead row versions. Any space that is freed by
VACUUM FULL is immediately returned to the
operating system. Unfortunately, this variant of the
VACUUM command acquires an exclusive lock on
Description
- VACUUM reclaims storage occupied by expired tuples.
+ VACUUM reclaims storage occupied by dead tuples.
In normal
PostgreSQL operation, tuples that
are deleted or obsoleted by an update are not physically removed from
their table; they remain present until a VACUUM is
We recommend that active production databases be
vacuumed frequently (at least nightly), in order to
- remove expired rows. After adding or deleting a large number
+ remove dead rows. After adding or deleting a large number
of rows, it may be a good idea to issue a VACUUM
ANALYZE command for the affected table. This will update the
system catalogs with