↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

GUC Parameters / Vacuuming

autovacuum_vacuum_threshold

Read the PG 18 manual

Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table.

Reading PG 18current·documented in 22 of 24 versions, 8.1 to 20

Type
integer
Context
sighup
Measured default
50
Unit
—
Metadata snapshot
18

Definition PG 18 manual

Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. 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.

Measured default history
Version intervalDefault
9.0 – 1950
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source

How it works

Minimum number of tuple updates or deletes prior to vacuum. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

The ordinary automatic-vacuum threshold is the base term plus scale factor times reltuples, capped by autovacuum_vacuum_max_threshold from PG18. It reacts to dead tuples from updates/deletes, permits per-table overrides, and is separate from mandatory anti-wraparound vacuuming.

Monitor and change autovacuum_vacuum_threshold together with autovacuum_vacuum_scale_factor, autovacuum_vacuum_max_threshold, autovacuum_vacuum_insert_threshold. Validate on the relevant server role and real workload, then use its sighup context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Operational considerations

Changing the global value while a table storage parameter overrides it.

Treating reltuples and cumulative change statistics as exact real-time counts.

Blaming a threshold without checking long transactions, replication slots, and worker saturation.

Buying short-term quiet by deferring maintenance until wraparound failsafe activates.

Workload guidance

OLAP: Run explicit ANALYZE/VACUUM after bulk loads instead of waiting only for proportional triggers; plan freezing and visibility-map advancement separately for append-only partitions.

OLTP: Tune autovacuum_vacuum_threshold from table size, change rate, and maintenance SLA, using per-table thresholds for large/hot relations. Observe trigger intervals, dead tuples, and ANALYZE/VACUUM duration.

SMALL: Start with upstream. Fixed thresholds dominate on small tables; after changes, confirm worker and I/O headroom.

Version history 6
  1. 17 → 18 changed
  2. 9.4 → 9.5 changed
  3. 8.3 → 8.4 changed
  4. 8.2 → 8.3 changed
  5. 8.1 → 8.2 changed
  6. 8.0 → 8.1 added

Related entries

Further reading

Definition snapshot: english-manuals:0bf2afb09d5f9c1977a07f33323… · English manual source