pgconfigurator
pgconfigurator

log_duration

No restart — reload (superuser)boolean (on/off)

Logs the duration of every completed statement (without the statement text).

What it does

log_duration writes a duration line for every statement, regardless of how long it ran — but without the statement itself. It's blunt: useful for audit-style counters, less so for diagnosis.

How to tune it

Prefer log_min_duration_statement for slow-query work — that logs both the text and the duration above a threshold, which is what you almost always want. log_duration is for cases where you genuinely want a duration record for every statement.

Related parameters