{"Entry":{"collection":"guc","key":"syslog_sequence_numbers","name":"syslog_sequence_numbers","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging / Where to Log","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.5","status":"added","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"9.6","status":"changed","to":"10"}],"content_hash":"cb4eac62d974473e84b7149b4ee933a0695f2dbaac325f33e02f7d341662a627","context":"","default_changed_in":[],"default_history":[{"from":"9.6","to":"19","value":"on"}],"derived_content_hash":"3185edac1018c489a02dafa799e2d12d2c593c8062111ba10fc51775ef702cfa","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:d7b7295a0c4931d83b20dbf6b67157c88ec166a067b435fb634f76ffb7ba5b59","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"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."},"mechanism":["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."],"pitfalls":["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."],"references":[{"title":"PostgreSQL 19 Beta 4: syslog_sequence_numbers","url":"https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-SYSLOG-SEQUENCE-NUMBERS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["log_destination","syslog_facility","syslog_ident","syslog_split_messages","logging_collector"],"summary":"syslog_sequence_numbers is the PostgreSQL setting that adds sequence number to syslog messages to avoid duplicate suppression."},"enumvals":[],"first_version":"9.6","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:57.824946+08:00","intro_commit":{"authored_at":"2016-02-26T22:34:30-05:00","discussion":[],"hash":"f4c454e9ba5262c5614c7637983c83b8c327e231","subject":"Add syslog_sequence_numbers parameter","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=f4c454e9ba5262c5614c7637983c83b8c327e231"},"key":"syslog_sequence_numbers","last_version":"20","max_val":"","min_val":"","name":"syslog_sequence_numbers","position":404,"present_in":["9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:c7f865486074143f8ab70c9630b189ffcb4b4094b21949f85d621d25b815754b","receipt_sha256":"9d16cae7ab77487c5f7743b8a9fa0a152264b4a88019cdee6f50dc5bbf671193","repair":"wiki-repair-20261023"},"short_desc":"When logging to syslog and this is on (the default), then each message will be prefixed by an increasing sequence number (such as [2]).","short_desc_zh":"","source_rev":"wiki-repair-20261023:d7b7295a0c4931d83b20dbf6b67157c88ec166a067b435fb634f76ffb7ba5b59","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"syslog_sequence_numbers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"syslog_sequence_numbers","SourceRevision":"wiki-repair-20261023:d7b7295a0c4931d83b20dbf6b67157c88ec166a067b435fb634f76ffb7ba5b59","Facts":{"boot_val":"on","category":"Reporting and Logging / Where to Log","context":"sighup","description":"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.","description_zh":"当日志被记录到 syslog 并且这个设置为 on（默认）时，每一个消息会被加上一个增长的序号作为前缀（例如[2]）。这种行为避开了很多 syslog 实现默认采用的“--- 上一个消息重复 N 次 ---”形式。在现代 syslog 实现中，抑制重复消息是可以配置的（例如 rsyslog 中的 $RepeatedMsgReduction），因此这个参数可能不是必需的。此外，如果你真的想抑制重复消息，你可以把这个参数设置为 off。 这个参数只能在 postgresql.conf 文件或者服务器命令行上设置。","description_zh_html":"\u003cp\u003e\n         当日志被记录到 \u003cspan class=\"application\"\u003esyslog\u003c/span\u003e 并且这个设置为 on（默认）时，每一个消息会被加上一个增长的序号作为前缀（例如\u003ccode class=\"literal\"\u003e[2]\u003c/code\u003e）。这种行为避开了很多 syslog 实现默认采用的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e--- 上一个消息重复 N 次 ---\u003c/span\u003e”\u003c/span\u003e形式。在现代 syslog 实现中，抑制重复消息是可以配置的（例如 \u003cspan class=\"productname\"\u003ersyslog\u003c/span\u003e 中的 \u003ccode class=\"literal\"\u003e$RepeatedMsgReduction\u003c/code\u003e），因此这个参数可能不是必需的。此外，如果你真的想抑制重复消息，你可以把这个参数设置为 off。\n        \u003c/p\u003e\u003cp\u003e\n         这个参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件或者服务器命令行上设置。\n        \u003c/p\u003e","doc":{"anchor":"GUC-SYSLOG-SEQUENCE-NUMBERS","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","slug":"18"},"doc_html":"\u003cp\u003e\n         When logging to \u003cspan class=\"application\"\u003esyslog\u003c/span\u003e and this is on (the\n         default), then each message will be prefixed by an increasing\n         sequence number (such as \u003ccode class=\"literal\"\u003e[2]\u003c/code\u003e).  This circumvents\n         the \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e--- last message repeated N times ---\u003c/span\u003e”\u003c/span\u003e suppression\n         that many syslog implementations perform by default.  In more modern\n         syslog implementations, repeated message suppression can be configured\n         (for example, \u003ccode class=\"literal\"\u003e$RepeatedMsgReduction\u003c/code\u003e\n         in \u003cspan class=\"productname\"\u003ersyslog\u003c/span\u003e), so this might not be\n         necessary.  Also, you could turn this off if you actually want to\n         suppress repeated messages.\n        \u003c/p\u003e\u003cp\u003e\n         This parameter can only be set in the \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e\n         file or on the server command line.\n        \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","version":"18.7"},{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"68c010254e1859ec0b76f06a563babd51a6c38997f1242e35e4c6b649724b1cb","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"syslog_sequence_numbers","short_desc":"Add sequence number to syslog messages to avoid duplicate suppression.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-logging.html","sha256":"a322f5293f10e348b5fc5dca98fdb6af52462723a215b8701c3b9d933e2933b4"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-SYSLOG-SEQUENCE-NUMBERS","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"syslog_sequence_numbers","SourceDatabase":"center","Version":"18","Locale":"en","Title":"syslog_sequence_numbers","Summary":"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.","BodyHTML":"\u003cp\u003e\n         When logging to \u003cspan\u003esyslog\u003c/span\u003e and this is on (the\n         default), then each message will be prefixed by an increasing\n         sequence number (such as \u003ccode\u003e[2]\u003c/code\u003e).  This circumvents\n         the \u003cspan\u003e“\u003cspan\u003e--- last message repeated N times ---\u003c/span\u003e”\u003c/span\u003e suppression\n         that many syslog implementations perform by default.  In more modern\n         syslog implementations, repeated message suppression can be configured\n         (for example, \u003ccode\u003e$RepeatedMsgReduction\u003c/code\u003e\n         in \u003cspan\u003ersyslog\u003c/span\u003e), so this might not be\n         necessary.  Also, you could turn this off if you actually want to\n         suppress repeated messages.\n        \u003c/p\u003e\u003cp\u003e\n         This parameter can only be set in the \u003ccode\u003epostgresql.conf\u003c/code\u003e\n         file or on the server command line.\n        \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:d7b7295a0c4931d83b20dbf6b67157c88ec166a067b435fb634f76ffb7ba5b59","ContentHash":"21c6320bee34d729ec5cabf0e89a7c53858fdaf9f1bd15b2a13377385b2ceb6b","Payload":{"description":"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."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
