Printf-style prefix on each log line.
At a glance
| Property | Value |
|---|---|
| Parameter | log_line_prefix |
| Category | Logging |
| Default | '%m [%p] ' |
| Value type | boolean / enum / numeric |
| Change scope | Reload (no restart) |
What it does
Template controlling the metadata prefixed to each log line (timestamp, PID, user, database, application, etc.).
How to apply a change
Takes effect on configuration reload (sighup context). Run SELECT pg_reload_conf(); or send SIGHUP — no restart needed.
Inspect the current value and source with SHOW log_line_prefix; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'log_line_prefix';.
Tuning guidance
Use a rich prefix like %m [%p] %q%u@%d %a so logs are parseable by tools (pgBadger) and include user/db/app context for triage.