{"Entry":{"collection":"func","key":"pg-create-logical-replication-slot","name":"pg_create_logical_replication_slot","aliases":[],"metadata":{"changed_in":["10","14","17"],"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.6","group_changed":null,"signatures":{"added":["pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean] ) → (slot_name name, lsn pg_lsn)"],"removed":["pg_create_logical_replication_slot ( slot_name name, plugin name ) → (slot_name name, xlog_position pg_lsn)"]},"status":"changed","to":"10"},{"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":["pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean ] ) → record ( slot_name name, lsn pg_lsn )"],"removed":["pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean ] ) → record ( slot_name name, lsn pg_lsn )"]},"status":"changed","to":"14"},{"descriptions_changed":true,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":["pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover boolean ] ) → record ( slot_name name, lsn pg_lsn )"],"removed":["pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean ] ) → record ( slot_name name, lsn pg_lsn )"]},"status":"changed","to":"17"},{"descriptions_changed":true,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"19"}],"content_hash":"9e502cb0ad85459fa9243a0f6b909c2b29295010eeb6d7218136f80eb75849c3","first_version":"9.4","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.473862+08:00","last_version":"20","name":"pg_create_logical_replication_slot","name_key":"pg_create_logical_replication_slot","position":29025,"present_in":["9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover boolean ] ) → record ( slot_name name, lsn pg_lsn )","signature_count":1,"slug":"pg-create-logical-replication-slot","source_rev":"b7bd9cda","summary":"Creates a new logical (decoding) replication slot named slot_name using the output plugin plugin.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-create-logical-replication-slot","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-create-logical-replication-slot","SourceRevision":"b7bd9cda","Facts":{"description":"Creates a new logical (decoding) replication slot named slot_name using the output plugin plugin. 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. The optional fourth parameter, twophase, when set to true, specifies that the decoding of prepared transactions is enabled for this slot. The optional fifth parameter, failover, when set to true, specifies that this slot is enabled to be synced to the standbys so that logical replication can be resumed after failover. A call to this function has the same effect as the replication protocol command CREATE_REPLICATION_SLOT ... LOGICAL.","description_html":"Creates a new logical (decoding) replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e using the output plugin \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\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. The optional fourth parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that the decoding of prepared transactions is enabled for this slot. The optional fifth parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that this slot is enabled to be synced to the standbys so that logical replication can be resumed after failover. A call to this function has the same effect as the replication protocol command \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... LOGICAL\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 logical (decoding) replication slot named slot_name using the output plugin plugin. 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. The optional fourth parameter, twophase, when set to true, specifies that the decoding of prepared transactions is enabled for this slot. The optional fifth parameter, failover, when set to true, specifies that this slot is enabled to be synced to the standbys so that logical replication can be resumed after failover. A call to this function has the same effect as the replication protocol command CREATE_REPLICATION_SLOT ... LOGICAL.","description_html":"Creates a new logical (decoding) replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e using the output plugin \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\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. The optional fourth parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that the decoding of prepared transactions is enabled for this slot. The optional fifth parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that this slot is enabled to be synced to the standbys so that logical replication can be resumed after failover. A call to this function has the same effect as the replication protocol command \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... LOGICAL\u003c/code\u003e.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_create_logical_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, \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\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_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover 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-logical-replication-slot","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_create_logical_replication_slot","Summary":"创建一个名为slot_name的新逻辑（解码）复制槽，使用输出插件plugin。可选的第三个参数temporary，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数twophase，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数failover，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令CREATE_REPLICATION_SLOT ... LOGICAL相同。","BodyHTML":"创建一个名为\u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e的新逻辑（解码）复制槽，使用输出插件\u003cem\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e。可选的第三个参数\u003cem\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数\u003cem\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数\u003cem\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令\u003ccode\u003eCREATE_REPLICATION_SLOT ... LOGICAL\u003c/code\u003e相同。\u003cpre\u003epg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover boolean ] ) → record ( slot_name name, lsn pg_lsn )\u003c/pre\u003e创建一个名为\u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e的新逻辑（解码）复制槽，使用输出插件\u003cem\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e。可选的第三个参数\u003cem\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数\u003cem\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数\u003cem\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令\u003ccode\u003eCREATE_REPLICATION_SLOT ... LOGICAL\u003c/code\u003e相同。","SourceRevision":"1b5ca64c","ContentHash":"c604b489b3fb430be5e1c235f32ab941d763552b63e8f545c5b24f204ca75276","Payload":{"description_zh":"创建一个名为slot_name的新逻辑（解码）复制槽，使用输出插件plugin。可选的第三个参数temporary，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数twophase，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数failover，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令CREATE_REPLICATION_SLOT ... LOGICAL相同。","description_zh_html":"创建一个名为\u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e的新逻辑（解码）复制槽，使用输出插件\u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e。可选的第三个参数\u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数\u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数\u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令\u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... LOGICAL\u003c/code\u003e相同。","signatures":[{"description_zh":"创建一个名为slot_name的新逻辑（解码）复制槽，使用输出插件plugin。可选的第三个参数temporary，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数twophase，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数failover，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令CREATE_REPLICATION_SLOT ... LOGICAL相同。","description_zh_html":"创建一个名为\u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e的新逻辑（解码）复制槽，使用输出插件\u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e。可选的第三个参数\u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定槽不应永久存储到磁盘，仅供当前会话使用。临时槽也会在任何错误发生时释放。可选的第四个参数\u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定为此槽启用预备事务的解码。可选的第五个参数\u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e，当设置为真时，指定启用此槽同步到备库，以便在故障切换后可以恢复逻辑复制。调用此函数的效果与复制协议命令\u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... LOGICAL\u003c/code\u003e相同。","returns":"record","text":"pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover 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":"e9760d06ca931b81a01535a5a71899b7689e6dd2a958e6467b80646f43789777","Text":"pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover boolean ] ) → record ( slot_name name, lsn pg_lsn )","Returns":"record","Payload":{"description":"Creates a new logical (decoding) replication slot named slot_name using the output plugin plugin. 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. The optional fourth parameter, twophase, when set to true, specifies that the decoding of prepared transactions is enabled for this slot. The optional fifth parameter, failover, when set to true, specifies that this slot is enabled to be synced to the standbys so that logical replication can be resumed after failover. A call to this function has the same effect as the replication protocol command CREATE_REPLICATION_SLOT ... LOGICAL.","description_html":"Creates a new logical (decoding) replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e using the output plugin \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\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. The optional fourth parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that the decoding of prepared transactions is enabled for this slot. The optional fifth parameter, \u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\u003c/code\u003e\u003c/em\u003e, when set to true, specifies that this slot is enabled to be synced to the standbys so that logical replication can be resumed after failover. A call to this function has the same effect as the replication protocol command \u003ccode class=\"literal\"\u003eCREATE_REPLICATION_SLOT ... LOGICAL\u003c/code\u003e.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_create_logical_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, \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etwophase\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efailover\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_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover boolean ] ) → record ( slot_name name, lsn pg_lsn )","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
