{"Entry":{"collection":"func","key":"pg-copy-logical-replication-slot","name":"pg_copy_logical_replication_slot","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"11","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","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":"15","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"16"},{"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":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"19"}],"content_hash":"d7fe3ecb39c6668610e7de1b68a565a42c8ca293be1104c7bd37b39d120f5602","first_version":"12","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.467149+08:00","last_version":"20","name":"pg_copy_logical_replication_slot","name_key":"pg_copy_logical_replication_slot","position":29023,"present_in":["12","13","14","15","16","17","18","19","20"],"signature":"pg_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name ]] ) → record ( slot_name name, lsn pg_lsn )","signature_count":1,"slug":"pg-copy-logical-replication-slot","source_rev":"b7bd9cda","summary":"Copies an existing logical replication slot named src_slot_name to a logical replication slot named dst_slot_name, optionally changing the output plugin and persistence.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-copy-logical-replication-slot","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-copy-logical-replication-slot","SourceRevision":"b7bd9cda","Facts":{"description":"Copies an existing logical replication slot named src_slot_name to a logical replication slot named dst_slot_name, optionally changing the output plugin and persistence. The copied logical slot starts from the same LSN as the source logical slot. Both temporary and plugin are optional; if they are omitted, the values of the source slot are used. The failover option of the source logical slot is not copied and is set to false by default. This is to avoid the risk of being unable to continue logical replication after failover to standby where the slot is being synchronized. Copy of an invalidated slot is not allowed.","description_html":"Copies an existing logical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e to a logical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e, optionally changing the output plugin and persistence. The copied logical slot starts from the same LSN as the source logical slot. Both \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e are optional; if they are omitted, the values of the source slot are used. The \u003ccode class=\"literal\"\u003efailover\u003c/code\u003e option of the source logical slot is not copied and is set to \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e by default. This is to avoid the risk of being unable to continue logical replication after failover to standby where the slot is being synchronized. Copy of an invalidated slot is not allowed.","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":"Copies an existing logical replication slot named src_slot_name to a logical replication slot named dst_slot_name, optionally changing the output plugin and persistence. The copied logical slot starts from the same LSN as the source logical slot. Both temporary and plugin are optional; if they are omitted, the values of the source slot are used. The failover option of the source logical slot is not copied and is set to false by default. This is to avoid the risk of being unable to continue logical replication after failover to standby where the slot is being synchronized. Copy of an invalidated slot is not allowed.","description_html":"Copies an existing logical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e to a logical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e, optionally changing the output plugin and persistence. The copied logical slot starts from the same LSN as the source logical slot. Both \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e are optional; if they are omitted, the values of the source slot are used. The \u003ccode class=\"literal\"\u003efailover\u003c/code\u003e option of the source logical slot is not copied and is set to \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e by default. This is to avoid the risk of being unable to continue logical replication after failover to standby where the slot is being synchronized. Copy of an invalidated slot is not allowed.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_copy_logical_replication_slot\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\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 [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e\u003c/span\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_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name ]] ) → 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-copy-logical-replication-slot","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_copy_logical_replication_slot","Summary":"复制一个名为src_slot_name的现有逻辑复制槽到一个名为dst_slot_name的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。temporary和plugin都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的failover选项不会被复制，而是默认设为false。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。","BodyHTML":"复制一个名为\u003cem\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e的现有逻辑复制槽到一个名为\u003cem\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。\u003cem\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e和\u003cem\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的\u003ccode\u003efailover\u003c/code\u003e选项不会被复制，而是默认设为\u003ccode\u003efalse\u003c/code\u003e。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。\u003cpre\u003epg_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name ]] ) → record ( slot_name name, lsn pg_lsn )\u003c/pre\u003e复制一个名为\u003cem\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e的现有逻辑复制槽到一个名为\u003cem\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。\u003cem\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e和\u003cem\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的\u003ccode\u003efailover\u003c/code\u003e选项不会被复制，而是默认设为\u003ccode\u003efalse\u003c/code\u003e。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。","SourceRevision":"1b5ca64c","ContentHash":"924e8cd26fac7b6e2bbd9b4052d6f1d53ba4584d2dc3c3936decec660afc612f","Payload":{"description_zh":"复制一个名为src_slot_name的现有逻辑复制槽到一个名为dst_slot_name的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。temporary和plugin都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的failover选项不会被复制，而是默认设为false。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。","description_zh_html":"复制一个名为\u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e的现有逻辑复制槽到一个名为\u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。\u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e和\u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的\u003ccode class=\"literal\"\u003efailover\u003c/code\u003e选项不会被复制，而是默认设为\u003ccode class=\"literal\"\u003efalse\u003c/code\u003e。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。","signatures":[{"description_zh":"复制一个名为src_slot_name的现有逻辑复制槽到一个名为dst_slot_name的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。temporary和plugin都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的failover选项不会被复制，而是默认设为false。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。","description_zh_html":"复制一个名为\u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e的现有逻辑复制槽到一个名为\u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e的逻辑复制槽，可选地更改输出插件和持久性。被复制的逻辑槽从与源逻辑槽相同的LSN开始。\u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e和\u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e都是可选的。如果它们被省略了，使用与源逻辑槽相同的值。源逻辑槽的\u003ccode class=\"literal\"\u003efailover\u003c/code\u003e选项不会被复制，而是默认设为\u003ccode class=\"literal\"\u003efalse\u003c/code\u003e。这是为了避免故障切换到正在同步该槽的备库后无法继续逻辑复制的风险。不能复制已失效的槽。","returns":"record","text":"pg_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name ]] ) → record ( slot_name name, lsn pg_lsn )","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"e5941e64b52c8953a87835739c47efa9f29f89c5ff759d583e3bbc0e3f2630bf","Text":"pg_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name ]] ) → record ( slot_name name, lsn pg_lsn )","Returns":"record","Payload":{"description":"Copies an existing logical replication slot named src_slot_name to a logical replication slot named dst_slot_name, optionally changing the output plugin and persistence. The copied logical slot starts from the same LSN as the source logical slot. Both temporary and plugin are optional; if they are omitted, the values of the source slot are used. The failover option of the source logical slot is not copied and is set to false by default. This is to avoid the risk of being unable to continue logical replication after failover to standby where the slot is being synchronized. Copy of an invalidated slot is not allowed.","description_html":"Copies an existing logical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e to a logical replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\u003c/code\u003e\u003c/em\u003e, optionally changing the output plugin and persistence. The copied logical slot starts from the same LSN as the source logical slot. Both \u003cem class=\"parameter\"\u003e\u003ccode\u003etemporary\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e are optional; if they are omitted, the values of the source slot are used. The \u003ccode class=\"literal\"\u003efailover\u003c/code\u003e option of the source logical slot is not copied and is set to \u003ccode class=\"literal\"\u003efalse\u003c/code\u003e by default. This is to avoid the risk of being unable to continue logical replication after failover to standby where the slot is being synchronized. Copy of an invalidated slot is not allowed.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_copy_logical_replication_slot\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003esrc_slot_name\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edst_slot_name\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 [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eplugin\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e\u003c/span\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_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name ]] ) → record ( slot_name name, lsn pg_lsn )","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
