{"Entry":{"collection":"guc","key":"wal_receiver_create_temp_slot","name":"wal_receiver_create_temp_slot","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Replication / Standby Servers","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"12","status":"added","to":"13"}],"content_hash":"efb26226e90bc4b035c5404d5776f6e535cdac715d39ded21004aacc0df0decf","context":"","default_changed_in":[],"default_history":[{"from":"13","to":"19","value":"off"}],"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 wal_receiver_create_temp_slot 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 whether a WAL receiver should create a temporary replication slot if no permanent slot is configured. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","If primary_slot_name is empty, the receiver can create a temporary upstream slot for the lifetime of its connection. That prevents removal during the connection but vanishes on disconnect, so it cannot guarantee catch-up across an outage.","Monitor and change wal_receiver_create_temp_slot together with primary_slot_name, max_replication_slots, max_slot_wal_keep_size. Validate on the relevant server role and real workload, then use its sighup 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: wal_receiver_create_temp_slot","url":"https://www.postgresql.org/docs/19/runtime-config-replication.html#GUC-WAL-RECEIVER-CREATE-TEMP-SLOT"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["primary_slot_name","max_replication_slots","max_slot_wal_keep_size","wal_keep_size","hot_standby","hot_standby_feedback"],"summary":"wal_receiver_create_temp_slot sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured. It is a sighup setting present in PG13–18; the latest recorded boot default is off."},"enumvals":[],"first_version":"13","group":"Replication","group_slug":"replication","imported_at":"2026-09-27T17:57:32.348524+08:00","intro_commit":{"authored_at":"2020-01-14T14:07:11+01:00","discussion":["https://www.postgresql.org/message-id/CA%2Bfd4k4dM0iEPLxyVyme2RAFsn8SUgrNtBJOu81YqTY4V%2BnqZA%40mail.gmail.com"],"hash":"329730827848f61eb8d353d5addcbd885fa823da","subject":"walreceiver uses a temporary replication slot by default","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=329730827848f61eb8d353d5addcbd885fa823da"},"key":"wal_receiver_create_temp_slot","last_version":"20","max_val":"","min_val":"","name":"wal_receiver_create_temp_slot","position":473,"present_in":["13","14","15","16","17","18","19","20"],"short_desc":"Specifies whether the WAL receiver process should create a temporary replication slot on the remote instance when no permanent replication slot to use has been configured (using primary_slot_name).","short_desc_zh":"","source_rev":"english-manuals:157ea496b87081d54afce8a72bd9f7ed4b0fa540b41d1935edc265ddc26a1308","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"wal_receiver_create_temp_slot","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"wal_receiver_create_temp_slot","SourceRevision":"english-manuals:157ea496b87081d54afce8a72bd9f7ed4b0fa540b41d1935edc265ddc26a1308","Facts":{"boot_val":"off","category":"Replication / Standby Servers","context":"sighup","description":"Specifies whether the WAL receiver process should create a temporary replication slot on the remote instance when no permanent replication slot to use has been configured (using primary_slot_name). The default is off. This parameter can only be set in the postgresql.conf file or on the server command line. If this parameter is changed while the WAL receiver process is running, that process is signaled to shut down and expected to restart with the new setting.","doc":{"anchor":"GUC-WAL-RECEIVER-CREATE-TEMP-SLOT","file":"runtime-config-replication.html","lang":"en","sha256":"c78480a202f8579e2655e080060afe4859c9eb26a16318fb9099dabb178fb32d","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"wal_receiver_create_temp_slot","short_desc":"Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-WAL-RECEIVER-CREATE-TEMP-SLOT","file":"runtime-config-replication.html","lang":"en","sha256":"c78480a202f8579e2655e080060afe4859c9eb26a16318fb9099dabb178fb32d","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"wal_receiver_create_temp_slot","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"wal_receiver_create_temp_slot","Summary":"","BodyHTML":"\u003cp\u003e指定在未使用\u003ca href=\"/docs/18/runtime-config-replication.html#GUC-PRIMARY-SLOT-NAME\" rel=\"nofollow\"\u003eprimary_slot_name\u003c/a\u003e配置要使用的永久复制槽时，WAL 接收进程是否应在远程实例上创建临时复制槽。默认值为 off。此参数只能在\u003ccode\u003epostgresql.conf\u003c/code\u003e文件中或服务器命令行上设置。如果在 WAL 接收进程运行时更改此参数，则会向该进程发送信号使其关闭，并预期它使用新设置重新启动。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"6c5222eab7e9aa1687cf72549a3e5d5279b8b71b6e8693604987179f20a3165c","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定在未使用\u003ca href=\"/docs/18/runtime-config-replication.html#GUC-PRIMARY-SLOT-NAME\"\u003eprimary_slot_name\u003c/a\u003e配置要使用的永久复制槽时，WAL 接收进程是否应在远程实例上创建临时复制槽。默认值为 off。此参数只能在\u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e文件中或服务器命令行上设置。如果在 WAL 接收进程运行时更改此参数，则会向该进程发送信号使其关闭，并预期它使用新设置重新启动。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
