Configuration parameter

autovacuum_vacuum_insert_threshold — PostgreSQL configuration parameter

Category Vacuuming Default 1000 tuples Change scope Sighup

Specifies the number of inserted tuples needed to trigger a VACUUM in any one table.

At a glance

Property Value
Parameter autovacuum_vacuum_insert_threshold
Category Vacuuming
Default 1000
Value type integer
Change scope Reload (postgresql.conf, SIGHUP)
Available in PostgreSQL 13, 14, 15, 16, 17, 18, 19 (added in 13)

What it does

Specifies the number of inserted tuples needed to trigger a VACUUM in any one table. The default is 1000 tuples. If -1 is specified, autovacuum will not trigger a VACUUM operation on any tables based on the number of inserts. 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 table 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_insert_threshold; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'autovacuum_vacuum_insert_threshold';.

Tuning guidance

Lower it so insert-only tables get vacuumed (to set visibility-map bits and enable index-only scans) without waiting for dead tuples; raise it to reduce vacuum frequency on append-heavy tables.

Reference

PostgreSQL documentation — autovacuum_vacuum_insert_threshold.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters