diff options
author | Michael Paquier | 2018-10-04 00:00:33 +0000 |
---|---|---|
committer | Michael Paquier | 2018-10-04 00:00:33 +0000 |
commit | 803b1301e8c9aac478abeec62824a5d09664ffff (patch) | |
tree | f4ade5601668689308c4acdd34fef6d6984dd54b /doc/src/sgml/ref/vacuum.sgml | |
parent | d173652797cf0cf456ac2c38eca898159a7c19fc (diff) |
Add option SKIP_LOCKED to VACUUM and ANALYZE
When specified, this option allows VACUUM to skip the work on a relation
if there is a conflicting lock on it when trying to open it at the
beginning of its processing.
Similarly to autovacuum, this comes with a couple of limitations while
the relation is processed which can cause the process to still block:
- when opening the relation indexes.
- when acquiring row samples for table inheritance trees, partition trees
or certain types of foreign tables, and that a lock is taken on some
leaves of such trees.
Author: Nathan Bossart
Reviewed-by: Michael Paquier, Andres Freund, Masahiko Sawada
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src/sgml/ref/vacuum.sgml')
-rw-r--r-- | doc/src/sgml/ref/vacuum.sgml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index b760e8ede18..fd911f57766 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -31,6 +31,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet VERBOSE ANALYZE DISABLE_PAGE_SKIPPING + SKIP_LOCKED <phrase>and <replaceable class="parameter">table_and_columns</replaceable> is:</phrase> @@ -161,6 +162,26 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet </varlistentry> <varlistentry> + <term><literal>SKIP_LOCKED</literal></term> + <listitem> + <para> + Specifies that <command>VACUUM</command> should not wait for any + conflicting locks to be released when beginning work on a relation: + if a relation cannot be locked immediately without waiting, the relation + is skipped. Note that even with this option, + <command>VACUUM</command> may still block when opening the relation's + indexes. Additionally, <command>VACUUM ANALYZE</command> may still + block when acquiring sample rows from partitions, table inheritance + children, and some types of foreign tables. Also, while + <command>VACUUM</command> ordinarily processes all partitions of + specified partitioned tables, this option will cause + <command>VACUUM</command> to skip all partitions if there is a + conflicting lock on the partitioned table. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable class="parameter">table_name</replaceable></term> <listitem> <para> |