Capture stderr into managed, rotated log files.
At a glance
| Property | Value |
|---|---|
| Parameter | logging_collector |
| Category | Logging |
| Default | off |
| Value type | boolean / enum / numeric |
| Change scope | Restart required |
What it does
When on, a background process captures server stderr and writes it to rotated files in log_directory.
How to apply a change
Requires a full server restart (postmaster context). Set it in postgresql.conf and restart PostgreSQL.
Inspect the current value and source with SHOW logging_collector; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'logging_collector';.
Tuning guidance
Turn on for file-based logging with rotation (or send to syslog/journald instead). Required for log_filename/rotation settings to apply.