Configuration parameter

autovacuum_vacuum_max_threshold — PostgreSQL configuration parameter

Category Vacuuming Default 100,000,000 tuples Change scope Sighup

Specifies the maximum number of updated or deleted tuples needed to trigger a VACUUM in any one table, i.e., a limit on the value calculated with autovacuum_vacuum_threshold and autovacuum_vacuum_scale_factor.

At a glance

Property Value
Parameter autovacuum_vacuum_max_threshold
Category Vacuuming
Default 100,000,000
Value type integer
Change scope Reload (postgresql.conf, SIGHUP)
Available in PostgreSQL 18, 19 (added in 18)

What it does

Specifies the maximum number of updated or deleted tuples needed to trigger a VACUUM in any one table, i.e., a limit on the value calculated with autovacuum_vacuum_threshold and autovacuum_vacuum_scale_factor. The default is 100,000,000 tuples. If -1 is specified, autovacuum will not enforce a maximum number of updated or deleted tuples that will trigger a VACUUM operation. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing storage parameters.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Set it in postgresql.conf (or with ALTER SYSTEM) and reload with SELECT pg_reload_conf(); or pg_ctl reload — no restart needed.

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

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_vacuum_max_threshold.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters