commit 097a06d35d3bae67aa82baa56cddccc654df3c79 Author: James Coleman Date: Thu Jul 25 15:06:32 2019 -0500 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 1972c20a8f..1b6fe468a1 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -825,6 +825,24 @@ 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 SHARE UPDATE EXCLUSIVE + lock (the lock type held by autovacuum), 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 requiring a SHARE UPDATE EXCLUSIVE + lock (e.g., ANALYZE) can effectively prevent autovacuums from ever + completing. + +