diff options
author | Amit Kapila <akapila@postgresql.org> | 2019-09-19 08:02:12 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2019-09-19 08:58:11 +0530 |
commit | 62ed5e77f3dc6d8c65d917b60dc8512ddd6fd18e (patch) | |
tree | f99f87b6e8c5874967f38ec149a40916ca11c917 | |
parent | cb23c63bc6de3ecef2a6a9d58d44640865472da4 (diff) | |
download | postgresql-62ed5e77f3dc6d8c65d917b60dc8512ddd6fd18e.tar.gz postgresql-62ed5e77f3dc6d8c65d917b60dc8512ddd6fd18e.zip |
Doc: document autovacuum interruption.
It's important users be able to know (without looking at the source code)
that running DDL or DDL-like commands can interrupt autovacuum which can
lead to a lot of dead tuples and hence slower database operations.
Reported-by: James Coleman
Author: James Coleman
Reviewed-by: Amit Kapila
Backpatch-through: 9.4
Discussion: https://postgr.es/m/CAAaqYe-XYyNwML1=f=gnd0qWg46PnvD=BDrCZ5-L94B887XVxQ@mail.gmail.com
-rw-r--r-- | doc/src/sgml/maintenance.sgml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index d95c218d39c..aee8ff2dfbe 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -825,6 +825,26 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu <literal>autovacuum_vacuum_cost_limit</literal> storage parameters have been set are not considered in the balancing algorithm. </para> + + <para> + Autovacuum workers generally don't block other commands. If a process + attempts to acquire a lock that conficts with the + <literal>SHARE UPDATE EXCLUSIVE</literal> lock held by autovacuum, lock + acquisition will interrupt the autovacuum. For conflicting lock modes, + see <xref linkend="table-lock-compatibility"/>. However, if the autovacuum + is running to prevent transaction ID wraparound (i.e., the autovacuum query + name in the <structname>pg_stat_activity</structname> view ends with + <literal>(to prevent wraparound)</literal>), the autovacuum is not + automatically interrupted. + </para> + + <warning> + <para> + Regularly running commands that acquire locks conflicting with a + <literal>SHARE UPDATE EXCLUSIVE</literal> lock (e.g., ANALYZE) can + effectively prevent autovacuums from ever completing. + </para> + </warning> </sect2> </sect1> |