Parameter · Reporting and Logging / Where to Log
syslog_ident
Sets the program name used to identify PostgreSQL messages in syslog.
- Default:
postgres - Type: string
- Applies: Reload
In plain words
The program name shown in front of each syslog line, like postgres[7254]:. Change it to tell several PostgreSQL servers on one machine apart, or to route them to different files.
For DBAs and operators
Only used with syslog in log_destination. It becomes the syslog TAG (programname in rsyslog, SYSLOG_IDENTIFIER in journald), followed by the PID of the process that wrote the line. Captured after ALTER SYSTEM SET syslog_ident = 'pg-main' and a reload:
Route by ident:
:programname, isequal, "pg-main" /var/log/pg-main.log
& stop
journalctl -t pg-main -fNote that log_line_prefix is still applied, so the default %m [%p] repeats a timestamp and PID that syslog already adds. Many sites shorten the prefix for syslog, e.g. '%q%u@%d '. See also cluster_name for distinguishing clusters in ps.
How to change it
Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().
See it in context
Related parameters
log_destination syslog_facility syslog_sequence_numbers cluster_name