Update documentation mention of VACUUM FULL and CLUSTER where
appropriate. Guillaume Cottenceau
This commit is contained in:
parent
f14f27dd38
commit
9e38d2a4a8
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.74 2007/05/15 15:52:40 neilc Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.75 2007/05/30 19:45:00 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="maintenance">
|
<chapter id="maintenance">
|
||||||
<title>Routine Database Maintenance Tasks</title>
|
<title>Routine Database Maintenance Tasks</title>
|
||||||
@ -157,7 +157,8 @@
|
|||||||
command. This uses a more aggressive algorithm for reclaiming the
|
command. This uses a more aggressive algorithm for reclaiming the
|
||||||
space consumed by dead row versions. Any space that is freed by
|
space consumed by dead row versions. Any space that is freed by
|
||||||
<command>VACUUM FULL</command> is immediately returned to the
|
<command>VACUUM FULL</command> is immediately returned to the
|
||||||
operating system. Unfortunately, this variant of the
|
operating system, and the table data is physically compacted on
|
||||||
|
the disk. Unfortunately, this variant of the
|
||||||
<command>VACUUM</command> command acquires an exclusive lock on
|
<command>VACUUM</command> command acquires an exclusive lock on
|
||||||
each table while <command>VACUUM FULL</command> is processing
|
each table while <command>VACUUM FULL</command> is processing
|
||||||
it. Therefore, frequently using <command>VACUUM FULL</command> can
|
it. Therefore, frequently using <command>VACUUM FULL</command> can
|
||||||
@ -168,12 +169,16 @@
|
|||||||
<para>
|
<para>
|
||||||
The standard form of <command>VACUUM</> is best used with the goal
|
The standard form of <command>VACUUM</> is best used with the goal
|
||||||
of maintaining a fairly level steady-state usage of disk space. If
|
of maintaining a fairly level steady-state usage of disk space. If
|
||||||
you need to return disk space to the operating system you can use
|
you need to return disk space to the operating system, you can use
|
||||||
<command>VACUUM FULL</> — but what's the point of releasing disk
|
<command>VACUUM FULL</> — but what's the point of releasing disk
|
||||||
space that will only have to be allocated again soon? Moderately
|
space that will only have to be allocated again soon? Moderately
|
||||||
frequent standard <command>VACUUM</> runs are a better approach
|
frequent standard <command>VACUUM</> runs are a better approach
|
||||||
than infrequent <command>VACUUM FULL</> runs for maintaining
|
than infrequent <command>VACUUM FULL</> runs for maintaining
|
||||||
heavily-updated tables.
|
heavily-updated tables. However, if some heavily-updated tables
|
||||||
|
have gone too long with infrequent <command>VACUUM</>, you can
|
||||||
|
use <command>VACUUM FULL</> or <command>CLUSTER</> to get performance
|
||||||
|
back (it is much slower to scan a table containing almost only dead
|
||||||
|
rows).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.47 2007/01/31 23:26:04 momjian Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.48 2007/05/30 19:45:01 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -164,10 +164,11 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">
|
|||||||
<para>
|
<para>
|
||||||
The <option>FULL</option> option is not recommended for routine use,
|
The <option>FULL</option> option is not recommended for routine use,
|
||||||
but might be useful in special cases. An example is when you have deleted
|
but might be useful in special cases. An example is when you have deleted
|
||||||
most of the rows in a table and would like the table to physically shrink
|
or updated most of the rows in a table and would like the table to
|
||||||
to occupy less disk space. <command>VACUUM FULL</command> will usually
|
physically shrink to occupy less disk space and allow faster table
|
||||||
shrink the table more than a plain <command>VACUUM</command> would.
|
scans. <command>VACUUM FULL</command> will usually shrink the table
|
||||||
The <option>FULL</option> option does not shrink indexes; a periodic
|
more than a plain <command>VACUUM</command> would. The
|
||||||
|
<option>FULL</option> option does not shrink indexes; a periodic
|
||||||
<command>REINDEX</> is still recommended. In fact, it is often faster
|
<command>REINDEX</> is still recommended. In fact, it is often faster
|
||||||
to drop all indexes, <command>VACUUM FULL</>, and recreate the indexes.
|
to drop all indexes, <command>VACUUM FULL</>, and recreate the indexes.
|
||||||
</para>
|
</para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user