// postgresql · logging & diagnostics

log_autovacuum_min_duration

Log autovacuum runs that take at least this long; -1 disables, 0 logs all.

Standard
10min
Range
-1 to about 24 days, in ms
Restart needed
Nein
Default checked on
PostgreSQL 18

Was es bewirkt

The message includes pages removed, dead tuples left and I/O timing, which shows whether autovacuum is keeping up.

Standardwert

10min. 10min since PostgreSQL 15 (-1, disabled, before). Same in 18.

Check the current value

SHOW log_autovacuum_min_duration;

SELECT setting, unit, boot_val, context, source, pending_restart
FROM pg_settings
WHERE name = 'log_autovacuum_min_duration';

Change it

ALTER SYSTEM SET log_autovacuum_min_duration = '1s';
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 while investigating bloat or autovacuum throughput.

What can go wrong

0 on databases with many small tables produces a lot of log lines.

Questions about log_autovacuum_min_duration

What is the default value of log_autovacuum_min_duration in PostgreSQL?

10min. 10min since PostgreSQL 15 (-1, disabled, before). Same in 18.

Does changing log_autovacuum_min_duration 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 log_autovacuum_min_duration?

Lower it while investigating bloat or autovacuum throughput.

Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.

// one client for every engine

Check log_autovacuum_min_duration 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.