{"Entry":{"collection":"func","key":"pg-create-physical-replication-slot","name":"pg_create_physical_replication_slot","aliases":[],"metadata":{"changed_in":["9.6","10"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.4"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.5"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.5","group_changed":null,"signatures":{"added":["pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean ] ) → (slot_name name, xlog_position pg_lsn)"],"removed":["pg_create_physical_replication_slot ( slot_name name ) → (slot_name name, xlog_position pg_lsn)"]},"status":"changed","to":"9.6"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":["pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean] ) → (slot_name name, lsn pg_lsn)"],"removed":["pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean ] ) → (slot_name name, xlog_position pg_lsn)"]},"status":"changed","to":"10"},{"descriptions_changed":true,"doc_overhaul":false,"from":"10","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"11"},{"descriptions_changed":true,"doc_overhaul":false,"from":"11","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"12"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"13","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"14"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"},{"descriptions_changed":true,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"17"},{"descriptions_changed":true,"doc_overhaul":false,"from":"17","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"18"},{"descriptions_changed":true,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"19"}],"content_hash":"c9d84c861e44e02c1ea244947d1c36becb9e6f80b5f2a2674c554bdfe27badbb","first_version":"9.4","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.477466+08:00","last_version":"20","name":"pg_create_physical_replication_slot","name_key":"pg_create_physical_replication_slot","position":29026,"present_in":["9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )","signature_count":1,"slug":"pg-create-physical-replication-slot","source_rev":"b7bd9cda","summary":"Creates a new physical replication slot named slot_name.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-create-physical-replication-slot","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-create-physical-replication-slot","SourceRevision":"b7bd9cda","Facts":{"description":"Creates a new physical replication slot named slot_name. The optional second parameter, when true, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see Section 54.4. The optional third parameter, temporary, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by the current session. Temporary slots are also released upon any error. This function corresponds to the replication protocol command CREATE_REPLICATION_SLOT ... PHYSICAL.","description_html":"Creates a new physical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e. The optional second parameter, when \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see \u003ca href=\"/docs/18/protocol-replication.html\" title=\"54.4. Streaming Replication Protocol\"\u003eSection 54.4\u003c/a\u003e. The optional third parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by the current session. Temporary slots are also released upon any error. This function corresponds to the replication protocol command \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-REPLICATION-TABLE","file":"functions-admin.html","slug":"18"},"group":"admin","group_label":"System Administration Functions","lang":"en","layout":"table-new","pages":["functions-admin.html"],"prose_only":false,"signatures":[{"description":"Creates a new physical replication slot named slot_name. The optional second parameter, when true, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see Section 54.4. The optional third parameter, temporary, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by the current session. Temporary slots are also released upon any error. This function corresponds to the replication protocol command CREATE_REPLICATION_SLOT ... PHYSICAL.","description_html":"Creates a new physical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e. The optional second parameter, when \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see \u003ca href=\"/docs/18/protocol-replication.html\" title=\"54.4. Streaming Replication Protocol\"\u003eSection 54.4\u003c/a\u003e. The optional third parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by the current session. Temporary slots are also released upon any error. This function corresponds to the replication protocol command \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_create_physical_replication_slot\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eimmediately_reserve\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003erecord\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003elsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e )","returns":"record","text":"pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-REPLICATION-TABLE","file":"functions-admin.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-create-physical-replication-slot","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_create_physical_replication_slot","Summary":"创建名为 slot_name 的新物理复制槽。可选的第二个参数为 true 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见第 54.4 节。可选的第三个参数 temporary 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 CREATE_REPLICATION_SLOT ... PHYSICAL。","BodyHTML":"创建名为 \u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的新物理复制槽。可选的第二个参数为 \u003ccode\u003etrue\u003c/code\u003e 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见\u003ca href=\"/docs/18/protocol-replication.html\" rel=\"nofollow\"\u003e第 54.4 节\u003c/a\u003e。可选的第三个参数 \u003cem\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 \u003ccode\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e。\u003cpre\u003epg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )\u003c/pre\u003e创建名为 \u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的新物理复制槽。可选的第二个参数为 \u003ccode\u003etrue\u003c/code\u003e 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见\u003ca href=\"/docs/18/protocol-replication.html\" rel=\"nofollow\"\u003e第 54.4 节\u003c/a\u003e。可选的第三个参数 \u003cem\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 \u003ccode\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e。","SourceRevision":"1b5ca64c","ContentHash":"efecf0ea89f653954721a5a1785f22cb7d0df74bec91a9edf1dda3e7a155726c","Payload":{"description_zh":"创建名为 slot_name 的新物理复制槽。可选的第二个参数为 true 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见第 54.4 节。可选的第三个参数 temporary 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 CREATE_REPLICATION_SLOT ... PHYSICAL。","description_zh_html":"创建名为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的新物理复制槽。可选的第二个参数为 \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见\u003ca href=\"/docs/18/protocol-replication.html\" title=\"54.4. 流复制协议\"\u003e第 54.4 节\u003c/a\u003e。可选的第三个参数 \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e。","signatures":[{"description_zh":"创建名为 slot_name 的新物理复制槽。可选的第二个参数为 true 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见第 54.4 节。可选的第三个参数 temporary 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 CREATE_REPLICATION_SLOT ... PHYSICAL。","description_zh_html":"创建名为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的新物理复制槽。可选的第二个参数为 \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e 时，指定立即为此复制槽保留 LSN；否则在流复制客户端首次连接时保留 LSN。从物理槽流式传输更改只能使用流复制协议 — 参见\u003ca href=\"/docs/18/protocol-replication.html\" title=\"54.4. 流复制协议\"\u003e第 54.4 节\u003c/a\u003e。可选的第三个参数 \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e 为真时，指定该槽不永久存储到磁盘，且仅供当前会话使用。发生任何错误时，临时槽也会被释放。此函数对应复制协议命令 \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e。","returns":"record","text":"pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"62151ba12eb2fa1104e117220f022eda298aca006850b975ca1841268d1b0547","Text":"pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )","Returns":"record","Payload":{"description":"Creates a new physical replication slot named slot_name. The optional second parameter, when true, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see Section 54.4. The optional third parameter, temporary, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by the current session. Temporary slots are also released upon any error. This function corresponds to the replication protocol command CREATE_REPLICATION_SLOT ... PHYSICAL.","description_html":"Creates a new physical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e. The optional second parameter, when \u003ccode class=\"literal\"\u003etrue\u003c/code\u003e, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see \u003ca href=\"/docs/18/protocol-replication.html\" title=\"54.4. Streaming Replication Protocol\"\u003eSection 54.4\u003c/a\u003e. The optional third parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by the current session. Temporary slots are also released upon any error. This function corresponds to the replication protocol command \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... PHYSICAL\u003c/code\u003e.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_create_physical_replication_slot\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eimmediately_reserve\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003erecord\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003elsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e )","returns":"record","text":"pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
