|PostgreSQL Reference Manual - Volume 3 - Server Administration Guide|
by The PostgreSQL Global Development Group
Paperback (6"x9"), 204 pages
RRP £13.95 ($24.95)
Sales of this book support the PostgreSQL project! Get a printed copy>>>
9.1 Routine Vacuuming
must be run on a regular basis for several reasons:
- To recover or reuse disk space occupied by updated or deleted rows.
- To update data statistics used by the PostgreSQL query planner.
- To protect against loss of very old data due to transaction ID wraparound.
The frequency and scope of the
performed for each of these reasons will vary depending on the
needs of each site. Therefore, database administrators must
understand these issues and develop an appropriate maintenance
strategy. This section concentrates on explaining the high-level
issues; for details about command syntax and so on, see the
VACUUM reference page.
The standard form of
VACUUM can run in parallel with production
database operations. Commands such as
will continue to function as normal, though you will not be able to modify the
definition of a table with commands such as
ALTER TABLE ADD COLUMN
while it is being vacuumed.
VACUUM requires a substantial amount of I/O
traffic, which can cause poor performance for other active sessions.
There are configuration parameters that can be adjusted to reduce the
performance impact of background vacuuming--see
section 4.4.4 Cost-Based Vacuum Delay.
An automated mechanism for performing the necessary
operations has been added in PostgreSQL 8.1.
See section 9.1.4 The auto-vacuum daemon.
|ISBN 0954612043||PostgreSQL Reference Manual - Volume 3 - Server Administration Guide||See the print edition|