From 01ecdb2e6ebc57ddd7f343d135617a92ba0ebf73 Mon Sep 17 00:00:00 2001 From: Daniil Davidov Date: Fri, 31 Oct 2025 14:44:35 +0700 Subject: [PATCH v13 4/4] 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 0a2a8b49fdb..d3ea02cbbe0 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2835,6 +2835,7 @@ include_dir 'conf.d' When changing this value, consider also adjusting , + , , and . @@ -9254,6 +9255,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. Is capped by + . The default is 0, + which means no parallel index vacuuming. + + + + diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index dc59c88319e..2db34cec0a9 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -897,6 +897,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 total number of parallel autovacuum workers that can be active at one + time 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 a157a244e4e..6eb58c95d9e 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1717,6 +1717,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