Which statement kinds to log (none/ddl/mod/all).
At a glance
| Property | Value |
|---|---|
| Parameter | log_statement |
| Category | Logging |
| Default | none |
| Value type | boolean / enum / numeric |
| Change scope | Superuser / reload |
What it does
Logs statements of the chosen category: ddl logs schema changes, mod adds data-modifying statements, all logs everything.
How to apply a change
Can be changed at runtime by a superuser for the current session, or globally via reload.
Inspect the current value and source with SHOW log_statement; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'log_statement';.
Tuning guidance
Use ddl in production for an audit trail of schema changes without the volume of all. all is for debugging only.