DB Internals AtlasPostgreSQL 18.6 Home About

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:

pg-main[7254]: [7-1] 2026-10-22 15:40:32.551 UTC [7254] ERROR: division by zero pg-main[7254]: [7-2] 2026-10-22 15:40:32.551 UTC [7254] STATEMENT: select 1/0pg-main[6270]: [1] 2026-10-22 15:40:32.590 UTC [6270] LOG: parameter "syslog_sequence_numbers" changed to "off" (sequence off, split on: chunk number only) pg-main[7277]: 2026-10-22 15:40:33.139 UTC [7277] ERROR: division by zero (both off)

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

Logger (logging collector)

Related parameters

syslog_split_messages syslog_ident syslog_facility log_destination

All Reporting and Logging parameters