{"Entry":{"collection":"guc","key":"max_wal_senders","name":"max_wal_senders","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Replication / Sending Servers","category_zh":"","changed_in":["9.1","9.2","9.6","10"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.4","status":"added","to":"9.0"},{"documentation_changed":true,"fields":{"category":{"from":"Write-Ahead Log / Streaming Replication","to":"Replication / Master Server"},"max_val":{"from":"536870911","to":"8388607"}},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":false,"fields":{"category":{"from":"Replication / Master Server","to":"Replication / Sending Servers"}},"from":"9.1","status":"changed","to":"9.2"},{"documentation_changed":true,"fields":{},"from":"9.3","status":"changed","to":"9.4"},{"documentation_changed":true,"fields":{"max_val":{"from":"8388607","to":"262143"}},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{"boot_val":{"from":"0","to":"10"}},"from":"9.6","status":"changed","to":"10"},{"documentation_changed":true,"fields":{},"from":"10","status":"changed","to":"11"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"},{"documentation_changed":true,"fields":{},"from":"12","status":"changed","to":"13"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"19","status":"changed","to":"20"}],"content_hash":"e72e5cf6cdc6746e19adf0fe133ead1d1d09f61e263b1fe4ecc5dc527c8cca9e","context":"","default_changed_in":["10"],"default_history":[{"from":"9.0","to":"9.6","value":"0"},{"from":"10","to":"19","value":"10"}],"derived_content_hash":"052f0d592cdab926a75b710051d885c11c575f45dc24c3f561578f003ebac7b0","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:2a0296dce31cba43d90f07179497635e516c25764787e489b5d131b3f1f337d7","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"olap":"Read standbys and logical subscribers often see long queries or large transactions. Put explicit bounds on replay/apply and monitor lag, worker saturation, slot restart_lsn, and conflict cancellations.","oltp":"Size max_wal_senders from topology, failover roles, slot/subscription count, and reconnect headroom. Test worst-case primary latency, standby replay, and disk retention before production.","small":"Configure only replication capacity that is actually used. Even a small topology needs bounded timeouts and slot lifecycle; unlimited retention is not reliability."},"mechanism":["Sets the maximum number of simultaneously running WAL sender processes. The value is fixed when the server starts, so changing it requires a restart.","Each streaming standby, WAL-streaming base backup, or logical replication connection can occupy a WAL sender. Zero disables sending, disconnected clients may retain a slot until timeout, and a standby must reserve at least as many senders as its primary to accept hot-standby queries safely.","Monitor and change max_wal_senders together with wal_level, max_replication_slots, archive_mode. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value."],"pitfalls":["Changing it on the wrong primary, standby, sender, or subscriber role.","Watching only configured bytes/time instead of actual lag, slot position, and worker state.","Failing over to a node that lacks the old primary's capacity or prerequisites.","Using infinite waits or WAL retention to hide a failed consumer."],"references":[{"title":"PostgreSQL 19 Beta 4: max_wal_senders","url":"https://www.postgresql.org/docs/19/runtime-config-replication.html#GUC-MAX-WAL-SENDERS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["wal_level","max_replication_slots","archive_mode","wal_log_hints","output_plugin_libraries","wal_sender_timeout"],"summary":"max_wal_senders — Sets the maximum number of simultaneously running WAL sender processes. Observed in PG9.0–19 Beta 4; its last measured boot default is 10 in PG19 Beta 4, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"9.0","group":"Replication","group_slug":"replication","imported_at":"2026-09-27T17:57:31.758842+08:00","intro_commit":{},"key":"max_wal_senders","last_version":"20","max_val":"","min_val":"","name":"max_wal_senders","position":288,"present_in":["9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:6a2cd8a8b64a40e16c69cdc15f4dacd39eb5627654217cb10a0b04bb375bb2fd","receipt_sha256":"ec9a9657e58f511f8769900deb0d2be460f5149790609e43f23893baf0133a7d","repair":"wiki-repair-20261023"},"short_desc":"Specifies the maximum number of concurrent connections from standby servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes).","short_desc_zh":"","source_rev":"wiki-repair-20261023:2a0296dce31cba43d90f07179497635e516c25764787e489b5d131b3f1f337d7","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"max_wal_senders","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"max_wal_senders","SourceRevision":"wiki-repair-20261023:2a0296dce31cba43d90f07179497635e516c25764787e489b5d131b3f1f337d7","Facts":{"boot_val":"10","category":"Replication / Sending Servers","context":"postmaster","description":"Specifies the maximum number of concurrent connections from standby servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes). The default is 10. The value 0 means replication is disabled. Abrupt disconnection of a streaming client might leave an orphaned connection slot behind until a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately reconnect. This parameter can only be set at server start. Also, wal_level must be set to replica or higher to allow connections from standby servers. When running a standby server, you must set this parameter to the same or higher value than on the primary server. Otherwise, queries will not be allowed in the standby server.","description_zh":"指定来自备库或流式基础备份客户端的最大并发连接数（即同时运行的 WAL 发送进程的最大数量）。默认值为 10。值 0 表示禁用复制。流式客户端突然断开连接后，可能会留下一个孤立连接槽，直到超时才释放。因此，此参数应设置得略高于预期的最大客户端数，使断开连接的客户端能够立即重新连接。此参数只能在服务器启动时设置。此外，wal_level 必须设置为 replica 或更高级别，才允许来自备库的连接。 运行备库时，必须将此参数设置为大于或等于主库上的值。否则，备库上将不允许查询。","description_zh_html":"\u003cp\u003e\n        指定来自备库或流式基础备份客户端的最大并发连接数（即同时运行的 WAL 发送进程的最大数量）。默认值为 \u003ccode class=\"literal\"\u003e10\u003c/code\u003e。值 \u003ccode class=\"literal\"\u003e0\u003c/code\u003e 表示禁用复制。流式客户端突然断开连接后，可能会留下一个孤立连接槽，直到超时才释放。因此，此参数应设置得略高于预期的最大客户端数，使断开连接的客户端能够立即重新连接。此参数只能在服务器启动时设置。此外，\u003ccode class=\"varname\"\u003ewal_level\u003c/code\u003e 必须设置为\n        \u003ccode class=\"literal\"\u003ereplica\u003c/code\u003e 或更高级别，才允许来自备库的连接。\n       \u003c/p\u003e\u003cp\u003e\n        运行备库时，必须将此参数设置为大于或等于主库上的值。否则，备库上将不允许查询。\n       \u003c/p\u003e","doc":{"anchor":"GUC-MAX-WAL-SENDERS","file":"runtime-config-replication.html","lang":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","slug":"18"},"doc_html":"\u003cp\u003e\n        Specifies the maximum number of concurrent connections from standby\n        servers or streaming base backup clients (i.e., the maximum number of\n        simultaneously running WAL sender processes). The default is\n        \u003ccode class=\"literal\"\u003e10\u003c/code\u003e.  The value \u003ccode class=\"literal\"\u003e0\u003c/code\u003e means\n        replication is disabled.  Abrupt disconnection of a streaming client might\n        leave an orphaned connection slot behind until a timeout is reached,\n        so this parameter should be set slightly higher than the maximum\n        number of expected clients so disconnected clients can immediately\n        reconnect.  This parameter can only be set at server start.  Also,\n        \u003ccode class=\"varname\"\u003ewal_level\u003c/code\u003e must be set to\n        \u003ccode class=\"literal\"\u003ereplica\u003c/code\u003e or higher to allow connections from standby\n        servers.\n       \u003c/p\u003e\u003cp\u003e\n         When running a standby server, you must set this parameter to the\n         same or higher value than on the primary server. Otherwise, queries\n         will not be allowed in the standby server.\n        \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","version":"18.7"},{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"83907b5f469e979a7b9ec875b5e7bdaa2ef6b85596ca31b45174f68cd7398b18","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"262143","metadata_version":"18","min_val":"0","name":"max_wal_senders","short_desc":"Sets the maximum number of simultaneously running WAL sender processes.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-replication.html","sha256":"52bd5892f7e5511d05f46fc0c13a017de85307c674a9014948eb4ad480326c15"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"integer","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-MAX-WAL-SENDERS","file":"runtime-config-replication.html","lang":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"max_wal_senders","SourceDatabase":"center","Version":"18","Locale":"en","Title":"max_wal_senders","Summary":"Specifies the maximum number of concurrent connections from standby servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes). The default is 10. The value 0 means replication is disabled. Abrupt disconnection of a streaming client might leave an orphaned connection slot behind until a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately reconnect. This parameter can only be set at server start. Also, wal_level must be set to replica or higher to allow connections from standby servers. When running a standby server, you must set this parameter to the same or higher value than on the primary server. Otherwise, queries will not be allowed in the standby server.","BodyHTML":"\u003cp\u003e\n        Specifies the maximum number of concurrent connections from standby\n        servers or streaming base backup clients (i.e., the maximum number of\n        simultaneously running WAL sender processes). The default is\n        \u003ccode\u003e10\u003c/code\u003e.  The value \u003ccode\u003e0\u003c/code\u003e means\n        replication is disabled.  Abrupt disconnection of a streaming client might\n        leave an orphaned connection slot behind until a timeout is reached,\n        so this parameter should be set slightly higher than the maximum\n        number of expected clients so disconnected clients can immediately\n        reconnect.  This parameter can only be set at server start.  Also,\n        \u003ccode\u003ewal_level\u003c/code\u003e must be set to\n        \u003ccode\u003ereplica\u003c/code\u003e or higher to allow connections from standby\n        servers.\n       \u003c/p\u003e\u003cp\u003e\n         When running a standby server, you must set this parameter to the\n         same or higher value than on the primary server. Otherwise, queries\n         will not be allowed in the standby server.\n        \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:2a0296dce31cba43d90f07179497635e516c25764787e489b5d131b3f1f337d7","ContentHash":"003f2c0873b6dbe8a972e95cd5ef19c5ecbcf34e616135a9528e575af529cc61","Payload":{"description":"Specifies the maximum number of concurrent connections from standby servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes). The default is 10. The value 0 means replication is disabled. Abrupt disconnection of a streaming client might leave an orphaned connection slot behind until a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately reconnect. This parameter can only be set at server start. Also, wal_level must be set to replica or higher to allow connections from standby servers. When running a standby server, you must set this parameter to the same or higher value than on the primary server. Otherwise, queries will not be allowed in the standby server."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
