Configuration parameter

autovacuum_worker_slots — PostgreSQL configuration parameter

Category Vacuuming Change scope Postmaster

Specifies the number of backend slots to reserve for autovacuum worker processes.

At a glance

Property Value
Parameter autovacuum_worker_slots
Category Vacuuming
Default typically
Value type integer
Change scope Server restart required (postgresql.conf)
Available in PostgreSQL 18, 19 (added in 18)

What it does

Specifies the number of backend slots to reserve for autovacuum worker processes. The default is typically 16 slots, but might be less if your kernel settings will not support it (as determined during initdb). This parameter can only be set at server start.

When changing this value, consider also adjusting autovacuum_max_workers.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Set it in postgresql.conf (or with ALTER SYSTEM) and restart the server — this parameter cannot change without a restart.

Inspect the current value and source with SHOW autovacuum_worker_slots; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'autovacuum_worker_slots';.

Tuning guidance

This parameter is rarely a performance lever. Leave it at the default unless you have a specific, documented reason to change it, change it on one session or one role/database first, and confirm the effect with pg_settings and your own measurements before rolling it out cluster-wide.

Reference

PostgreSQL documentation — autovacuum_worker_slots.

Keep going

Related & next steps

Concepts on this page

Was this helpful?

← All configuration parameters