{"Entry":{"collection":"func","key":"pg-logical-slot-get-changes","name":"pg_logical_slot_get_changes","aliases":[],"metadata":{"changed_in":["10"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":["pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges int, VARIADIC options text[] ) → (lsn pg_lsn, xid xid, data text)"],"removed":["pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges int, VARIADIC options text[] ) → (location pg_lsn, xid xid, data text)"]},"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":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"17"}],"content_hash":"437fad28ac6d3acf416e75d9f64a93351265a14edb656f1de930425a7263524a","first_version":"9.4","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.561207+08:00","last_version":"20","name":"pg_logical_slot_get_changes","name_key":"pg_logical_slot_get_changes","position":29058,"present_in":["9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text )","signature_count":1,"slug":"pg-logical-slot-get-changes","source_rev":"b7bd9cda","summary":"Returns changes in the slot slot_name, starting from the point from which changes have been consumed last.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-logical-slot-get-changes","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-logical-slot-get-changes","SourceRevision":"b7bd9cda","Facts":{"description":"Returns changes in the slot slot_name, starting from the point from which changes have been consumed last. If upto_lsn and upto_nchanges are NULL, logical decoding will continue until end of WAL. If upto_lsn is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If upto_nchanges is non-NULL, decoding will stop when the number of rows produced by decoding exceeds the specified value. Note, however, that the actual number of rows returned may be larger, since this limit is only checked after adding the rows produced when decoding each new transaction commit. 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":"Returns changes in the slot \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e, starting from the point from which changes have been consumed last. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e are NULL, logical decoding will continue until end of WAL. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e is non-NULL, decoding will stop when the number of rows produced by decoding exceeds the specified value. Note, however, that the actual number of rows returned may be larger, since this limit is only checked after adding the rows produced when decoding each new transaction commit. 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":"Returns changes in the slot slot_name, starting from the point from which changes have been consumed last. If upto_lsn and upto_nchanges are NULL, logical decoding will continue until end of WAL. If upto_lsn is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If upto_nchanges is non-NULL, decoding will stop when the number of rows produced by decoding exceeds the specified value. Note, however, that the actual number of rows returned may be larger, since this limit is only checked after adding the rows produced when decoding each new transaction commit. 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":"Returns changes in the slot \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e, starting from the point from which changes have been consumed last. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e are NULL, logical decoding will continue until end of WAL. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e is non-NULL, decoding will stop when the number of rows produced by decoding exceeds the specified value. Note, however, that the actual number of rows returned may be larger, since this limit is only checked after adding the rows produced when decoding each new transaction commit. 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_logical_slot_get_changes\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, \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"literal\"\u003eVARIADIC\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eoptions\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003esetof record\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003elsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003exid\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edata\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e )","returns":"setof record","text":"pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text )","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-REPLICATION-TABLE","file":"functions-admin.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-logical-slot-get-changes","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_logical_slot_get_changes","Summary":"返回槽 slot_name 中自上次消费更改的位置起的更改。如果 upto_lsn 和 upto_nchanges 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 upto_lsn 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 upto_nchanges 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在synchronized_standby_slots中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","BodyHTML":"返回槽 \u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 中自上次消费更改的位置起的更改。如果 \u003cem\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 和 \u003cem\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 \u003cem\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 \u003cem\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在\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_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text )\u003c/pre\u003e返回槽 \u003cem\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 中自上次消费更改的位置起的更改。如果 \u003cem\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 和 \u003cem\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 \u003cem\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 \u003cem\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在\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":"1e5f5897659127edb8a31e84ec6f2003661d55a3f62d372ea80948889e07e331","Payload":{"description_zh":"返回槽 slot_name 中自上次消费更改的位置起的更改。如果 upto_lsn 和 upto_nchanges 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 upto_lsn 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 upto_nchanges 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在synchronized_standby_slots中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","description_zh_html":"返回槽 \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 中自上次消费更改的位置起的更改。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在\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 中自上次消费更改的位置起的更改。如果 upto_lsn 和 upto_nchanges 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 upto_lsn 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 upto_nchanges 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在synchronized_standby_slots中指定的所有物理槽都确认已接收 WAL 后，该函数才会返回。","description_zh_html":"返回槽 \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e 中自上次消费更改的位置起的更改。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 和 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 都为 NULL，逻辑解码会持续到 WAL 末尾。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e 非 NULL，解码仅包含在指定 LSN 之前提交的事务。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e 非 NULL，解码产生的行数超过指定值时就会停止。不过，实际返回行数可能更大，因为只有在添加完对每个新事务提交进行解码所产生的行后，才会检查此限制。如果指定的槽是逻辑故障切换槽，则只有在\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":"setof record","text":"pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text )","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":"90e863c834c7a37aebb44cd321efda016aea95b9b74e3e1b8363a24a857fd982","Text":"pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text )","Returns":"setof record","Payload":{"description":"Returns changes in the slot slot_name, starting from the point from which changes have been consumed last. If upto_lsn and upto_nchanges are NULL, logical decoding will continue until end of WAL. If upto_lsn is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If upto_nchanges is non-NULL, decoding will stop when the number of rows produced by decoding exceeds the specified value. Note, however, that the actual number of rows returned may be larger, since this limit is only checked after adding the rows produced when decoding each new transaction commit. 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":"Returns changes in the slot \u003cem class=\"parameter\"\u003e\u003ccode\u003eslot_name\u003c/code\u003e\u003c/em\u003e, starting from the point from which changes have been consumed last. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e and \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e are NULL, logical decoding will continue until end of WAL. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_lsn\u003c/code\u003e\u003c/em\u003e is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e is non-NULL, decoding will stop when the number of rows produced by decoding exceeds the specified value. Note, however, that the actual number of rows returned may be larger, since this limit is only checked after adding the rows produced when decoding each new transaction commit. 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_logical_slot_get_changes\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, \u003cem class=\"parameter\"\u003e\u003ccode\u003eupto_nchanges\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"literal\"\u003eVARIADIC\u003c/code\u003e \u003cem class=\"parameter\"\u003e\u003ccode\u003eoptions\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003esetof record\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003elsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003exid\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edata\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e )","returns":"setof record","text":"pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text )","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
