commit 8f7568e4c438d9e6264458d7472747fda84ccace Author: jcoleman Date: Fri Sep 13 18:12:29 2019 +0000 Document autovacuum interruption It's important users be able to know (without looking at the source code) that running DDL or DDL-like commands frequently can interrupt autovacuum enough that it will effectively never run, resulting in lots of pain with dead tuples. diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index d95c218d39..b138fba0c7 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 autovacuum_vacuum_cost_limit storage parameters have been set are not considered in the balancing algorithm. + + + Autovacuum workers generally avoid interfering with other commands. + If a process attempts to acquire a lock that conficts with the + SHARE UPDATE EXCLUSIVE lock held by autovacuum + (see ), lock + acquisition will interrupt the autovacuum. However if the autovacuum is + running to prevent transaction ID wraparound (i.e., the autovacuum query + name in the pg_stat_activity view ends with + (for wraparound)), the autovacuum is not automatically + interrupted. + + + + + Regularly running commands that acquire locks conflicting with a + SHARE UPDATE EXCLUSIVE lock (e.g., ANALYZE) can + effectively prevent autovacuums from ever completing. + +