mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Provide a parenthesized-options syntax for VACUUM, analogous to that recently
adopted for EXPLAIN. This will allow additional options to be implemented in future without having to make them fully-reserved keywords. The old syntax remains available for existing options, however. Itagaki Takahiro
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.96 2009/08/07 20:54:31 alvherre Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.97 2009/11/16 21:32:06 tgl Exp $ -->
|
||||
|
||||
<chapter id="maintenance">
|
||||
<title>Routine Database Maintenance Tasks</title>
|
||||
@ -502,8 +502,9 @@ SELECT datname, age(datfrozenxid) FROM pg_database;
|
||||
only scans pages that have been modified since the last vacuum, but
|
||||
<structfield>relfrozenxid</> can only be advanced when the whole table is
|
||||
scanned. The whole table is scanned when <structfield>relfrozenxid</> is
|
||||
more than <varname>vacuum_freeze_table_age</> transactions old, when the
|
||||
<command>VACUUM FREEZE</> command is used, or when all pages happen to
|
||||
more than <varname>vacuum_freeze_table_age</> transactions old, when
|
||||
<command>VACUUM</>'s <literal>FREEZE</> option is used, or when all pages
|
||||
happen to
|
||||
require vacuuming to remove dead row versions. When <command>VACUUM</>
|
||||
scans the whole table, after it's finished <literal>age(relfrozenxid)</>
|
||||
should be a little more than the <varname>vacuum_freeze_min_age</> setting
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.55 2009/03/24 20:17:08 tgl Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.56 2009/11/16 21:32:06 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -21,6 +21,7 @@ PostgreSQL documentation
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
VACUUM [ ( { FULL | FREEZE | VERBOSE | ANALYZE } [, ...] ) ] [ <replaceable class="PARAMETER">table</replaceable> [ (<replaceable class="PARAMETER">column</replaceable> [, ...] ) ] ]
|
||||
VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> ]
|
||||
VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">table</replaceable> [ (<replaceable class="PARAMETER">column</replaceable> [, ...] ) ] ]
|
||||
</synopsis>
|
||||
@ -63,6 +64,15 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">
|
||||
blocks. This form is much slower and requires an exclusive lock on each
|
||||
table while it is being processed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the option list is surrounded by parentheses, the options can be
|
||||
written in any order. Without parentheses, options must be specified
|
||||
in exactly the order shown above.
|
||||
Prior to <productname>PostgreSQL</productname> 8.5, the unparenthesized
|
||||
syntax was the only one supported. It is expected that all new options
|
||||
will be supported only in the parenthesized syntax.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
@ -127,6 +137,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a specific column to analyze. Defaults to all columns.
|
||||
If a column list is specified, <literal>ANALYZE</> is implied.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -214,7 +225,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">
|
||||
table in the regression database:
|
||||
|
||||
<programlisting>
|
||||
regression=# VACUUM VERBOSE ANALYZE onek;
|
||||
regression=# VACUUM (VERBOSE, ANALYZE) onek;
|
||||
INFO: vacuuming "public.onek"
|
||||
INFO: index "onek_unique1" now contains 1000 tuples in 14 pages
|
||||
DETAIL: 3000 index tuples were removed.
|
||||
|
Reference in New Issue
Block a user