From 923f6f3d758edb1f64eadef1f5bb1dfb873f4b21 Mon Sep 17 00:00:00 2001 From: Daniil Davidov Date: Tue, 17 Mar 2026 03:23:38 +0700 Subject: [PATCH v27 5/5] Documentation for parallel autovacuum --- doc/src/sgml/config.sgml | 18 ++++++++++++++++++ doc/src/sgml/maintenance.sgml | 12 ++++++++++++ doc/src/sgml/ref/create_table.sgml | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 8cdd826fbd3..7741796c6b0 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2918,6 +2918,7 @@ include_dir 'conf.d' When changing this value, consider also adjusting , + , , and . @@ -9395,6 +9396,23 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; + + autovacuum_max_parallel_workers (integer) + + autovacuum_max_parallel_workers + configuration parameter + + + + + Sets the maximum number of parallel autovacuum workers that + can be used for parallel index vacuuming at one time by a single + autovacuum worker. Is capped by . + The default is 2. + + + + diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 7c958b06273..f2a280db569 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -926,6 +926,18 @@ HINT: Execute a database-wide VACUUM in that database. autovacuum workers' activity. + + If an autovacuum worker process comes across a table with the enabled + storage parameter, + it will launch parallel workers in order to vacuum indexes of this table + in a parallel mode. Parallel workers are taken from the pool of processes + established by , limited by + . + The number of parallel workers that can be taken from pool by a single + autovacuum worker is limited by the + configuration parameter. + + If several large tables all become eligible for vacuuming in a short amount of time, all autovacuum workers might become occupied with diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 982532fe725..4894de021cd 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1718,6 +1718,26 @@ WITH ( MODULUS numeric_literal, REM + + autovacuum_parallel_workers (integer) + + autovacuum_parallel_workers storage parameter + + + + + Sets the maximum number of parallel autovacuum workers that can process + indexes of this table. + The default value is -1, which means no parallel index vacuuming for + this table. If value is 0 then parallel degree will computed based on + number of indexes. + Note that the computed number of workers may not actually be available at + run time. If this occurs, the autovacuum will run with fewer workers + than expected. + + + + autovacuum_vacuum_threshold, toast.autovacuum_vacuum_threshold (integer) -- 2.43.0