log_line_prefix
No restart — takes effect on reloadformat string
The template for what metadata prefixes each log line (time, PID, user, db…).
What it does
log_line_prefix is a printf-style template controlling the context attached to every log entry — timestamp, process ID, user, database, application name, and more. Good prefixes make logs greppable and machine-parseable.
How to tune it
Include at least a timestamp (%m), PID (%p), and ideally user/database/app (%u/%d/%a). A common, log-analyzer-friendly value is '%m [%p] %q%u@%d/%a '. If you use a tool like pgBadger, match its recommended prefix.