Parameter · Reporting and Logging / Where to Log
syslog_sequence_numbers
Add sequence number to syslog messages to avoid duplicate suppression.
- Default:
on - Type: bool
- Applies: Reload
In plain words
Some syslog daemons replace identical consecutive lines with "last message repeated 5 times". When this is on, PostgreSQL puts an increasing number like [7-1] in front of each message so no two are identical and nothing is collapsed.
For DBAs and operators
The number is a per-process counter of messages. With syslog_split_messages also on, the format is [seq-chunk]; with splitting off it is just [seq]; with sequence numbers off but splitting on, only the chunk number [chunk] remains. Captured on 18.6:
Turning it off makes lines a bit cleaner, but with rsyslog's $RepeatedMsgReduction on you can then lose repeated errors in the count. The chunk number is also how you reassemble a long message split into several syslog lines. Only relevant when log_destination includes syslog.
How to change it
Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().
See it in context
Related parameters
syslog_split_messages syslog_ident syslog_facility log_destination