{"Entry":{"collection":"func","key":"pg-replication-slot-advance","name":"pg_replication_slot_advance","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"10","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"11"},{"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":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"17"}],"content_hash":"cda9842348cf0e3116464a3db36a0bf6f15ae6bd1b6cd748148980214b308cd6","first_version":"11","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.648626+08:00","last_version":"20","name":"pg_replication_slot_advance","name_key":"pg_replication_slot_advance","position":29091,"present_in":["11","12","13","14","15","16","17","18","19","20"],"signature":"pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn )","signature_count":1,"slug":"pg-replication-slot-advance","source_rev":"b7bd9cda","summary":"Advances the current confirmed position of a replication slot named slot_name.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-replication-slot-advance","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-replication-slot-advance","SourceRevision":"b7bd9cda","Facts":{"description":"Advances the current confirmed position of a replication slot named slot_name. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in synchronized_standby_slots have confirmed WAL receipt.","description_html":"Advances the current confirmed position of a replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\"\u003e\u003ccode class=\"varname\"\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e have confirmed WAL receipt.","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":"Advances the current confirmed position of a replication slot named slot_name. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in synchronized_standby_slots have confirmed WAL receipt.","description_html":"Advances the current confirmed position of a replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\"\u003e\u003ccode class=\"varname\"\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e have confirmed WAL receipt.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_replication_slot_advance\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\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\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\u003eend_lsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e )","returns":"record","text":"pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_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-replication-slot-advance","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_replication_slot_advance","Summary":"推进名为 slot_name 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 synchronized_standby_slots 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","BodyHTML":"推进名为 \u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\" rel=\"nofollow\"\u003e\u003ccode\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。\u003cpre\u003epg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn )\u003c/pre\u003e推进名为 \u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\" rel=\"nofollow\"\u003e\u003ccode\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","SourceRevision":"ca936764","ContentHash":"51f44e9bf9f8b1533511aa4a8ede06f38c79b4aec8f2aad765aa9e4b2ce2ec81","Payload":{"description_zh":"推进名为 slot_name 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 synchronized_standby_slots 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","description_zh_html":"推进名为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\"\u003e\u003ccode class=\"varname\"\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","signatures":[{"description_zh":"推进名为 slot_name 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 synchronized_standby_slots 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","description_zh_html":"推进名为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 的复制槽当前已确认的位置。该槽不会后退，也不会越过当前插入位置。返回槽名及其实际推进到的位置。如果发生了推进，更新后的槽位置信息会在下一个检查点写出。因此，发生崩溃时，槽可能回到更早的位置。如果指定的槽是逻辑故障切换槽，则只有在 \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\"\u003e\u003ccode class=\"varname\"\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e 中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","returns":"record","text":"pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn )","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"c5eddf10fd0b41ef45193a53226235e60e2d572348988d3932c7391e571f8f98","Text":"pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn )","Returns":"record","Payload":{"description":"Advances the current confirmed position of a replication slot named slot_name. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in synchronized_standby_slots have confirmed WAL receipt.","description_html":"Advances the current confirmed position of a replication slot named \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in \u003ca href=\"/docs/18/runtime-config-replication.html#GUC-SYNCHRONIZED-STANDBY-SLOTS\"\u003e\u003ccode class=\"varname\"\u003esynchronized_standby_slots\u003c/code\u003e\u003c/a\u003e have confirmed WAL receipt.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_replication_slot_advance\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\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\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\u003eend_lsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e )","returns":"record","text":"pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn )","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
