syslog_sequence_numbers
Read PG 18 manual ↗When logging to syslog and this is on (the default), then each message will be prefixed by an increasing sequence number (such as [2]).
- Type
- bool
- Context
- sighup
- Measured default
- on
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
When logging to syslog and this is on (the default), then each message will be prefixed by an increasing sequence number (such as [2]). This circumvents the “--- last message repeated N times ---” suppression that many syslog implementations perform by default. In more modern syslog implementations, repeated message suppression can be configured (for example, $RepeatedMsgReduction in rsyslog), so this might not be necessary. Also, you could turn this off if you actually want to suppress repeated messages.
This parameter can only be set in the postgresql.conf file or on the server command line.
Measured default history
| Version interval | Default |
|---|---|
| 9.6 – 19 | on |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
syslog_sequence_numbers adds sequence number to syslog messages to avoid duplicate suppression. A monotonically increasing sequence prefix prevents some syslog implementations from collapsing repeated messages and helps detect gaps.
syslog_sequence_numbers is a SIGHUP-context setting: a configuration reload activates the new server value without a restart; subsequent operations that consult it use the refreshed value.
It is active only when syslog appears in log_destination, after which the facility, ident, sequence, splitting, host daemon, and remote receiver jointly define record delivery.
Operational considerations
Editing syslog_sequence_numbers without reloading configuration and verifying the effective value and subsequent behavior.
Changing PostgreSQL framing or identifiers without testing the host daemon and remote receiver as one pipeline.
Assuming syslog preserves unlimited message size, multiline boundaries, ordering, or repeated records by default.
Changing syslog_sequence_numbers globally without a rollback plan and a client or operational compatibility test.
Workload guidance
OLAP: Test syslog_sequence_numbers under bursty analytical messages and multiline plans so splitting or receiver limits do not destroy record boundaries.
OLTP: Set syslog_sequence_numbers to match the receiving syslog daemon's routing, framing, deduplication, and message-size contract; validate failover and backpressure with the real collector.
SMALL: Prefer the host's established syslog convention for syslog_sequence_numbers; avoid parallel local-file retention unless it has an explicit purpose and size limit.
Version history 2
- PG 9.6 → 10changed
- PG 9.5 → 9.6added
Related entries
Further reading
Definition snapshot: english-manuals:0f61a19f83a57a1e8f1f60364f2… · English manual source