autovacuum_vacuum_scale_factor
Fraction of a table that must be dead rows before autovacuum vacuums it.
- Default
0.2- Range
- 0 to 100
- Restart needed
- No
- Default checked on
- PostgreSQL 18
What it does
The trigger is autovacuum_vacuum_threshold (50) + scale_factor x rows. With 0.2, a 100-million-row table waits for 20 million dead rows. PostgreSQL 18 adds autovacuum_vacuum_max_threshold (default 100,000,000) as an upper cap.
Default value
0.2. 0.2 (PostgreSQL 18).
Check the current value
SHOW autovacuum_vacuum_scale_factor; SELECT setting, unit, boot_val, context, source, pending_restart FROM pg_settings WHERE name = 'autovacuum_vacuum_scale_factor';
Change it
ALTER SYSTEM SET autovacuum_vacuum_scale_factor = 0.05; SELECT pg_reload_conf();
No restart: reload with SELECT pg_reload_conf() or pg_ctl reload. It cannot be changed per session (context is sighup).
When to change it
Lower it, usually per table with ALTER TABLE big_table SET (autovacuum_vacuum_scale_factor = 0.01), for large tables with steady updates or deletes.
What can go wrong
Very low values on small tables make autovacuum run constantly; prefer per-table overrides.
Questions about autovacuum_vacuum_scale_factor
What is the default value of autovacuum_vacuum_scale_factor in PostgreSQL?
0.2. 0.2 (PostgreSQL 18).
Does changing autovacuum_vacuum_scale_factor require a restart?
No. No restart: reload with SELECT pg_reload_conf() or pg_ctl reload. It cannot be changed per session (context is sighup).
When should I change autovacuum_vacuum_scale_factor?
Lower it, usually per table with ALTER TABLE big_table SET (autovacuum_vacuum_scale_factor = 0.01), for large tables with steady updates or deletes.
Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.
Check autovacuum_vacuum_scale_factor on your own server
SQLly runs the query above against PostgreSQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.