{"Entry":{"collection":"protocol","key":"logical-update","name":"Update (logical replication)","aliases":["Update"],"metadata":{"aliases":["Update"],"category":"Logical replication formats","content_hash":"c3a2e35bb35bb7ed0de62279516b94bca5859e4384d51090cd8f0709b3c260a0","derived_content_hash":"93390d0d3468082a489a931e0f5dbfc41fa25ce78d8ceea0dda0fb4abb6758d9","imported_at":"2026-09-30T00:40:44.677573+08:00","name":"Update (logical replication)","name_zh":"","slug":"logical-update","summary":"Logical replication Update format. Identifies the message as an update message."}},"Definition":{"Collection":"protocol","Key":"logical-update","SourceDatabase":"center","Version":"18","SourceTable":"protocol_message","SourceKey":"logical-update","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"fields":[{"description":"Identifies the message as an update message.","format":"Byte1('U')"},{"description":"Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.","format":"Int32 (TransactionId)"},{"description":"OID of the relation corresponding to the ID in the relation message.","format":"Int32 (Oid)"},{"description":"Identifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index.","format":"Byte1('K')"},{"description":"Identifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL.","format":"Byte1('O')"},{"description":"TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.","format":"TupleData"},{"description":"Identifies the following TupleData message as a new tuple.","format":"Byte1('N')"},{"description":"TupleData message part representing the contents of a new tuple.","format":"TupleData"}],"layer":"logical replication"},"comparison_hash":"6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77","description":["Logical replication Update format. Identifies the message as an update message."],"description_zh":"Byte1('U') 将该消息标识为 Update 消息。 Int32 (TransactionId) 事务的 Xid（仅在流式传输的事务中出现）。此字段从协议版本 2 起可用。 Int32 (Oid) 关系的 OID，与 Relation 消息中的 ID 对应。 Byte1('K') 将后续 TupleData 子消息标识为键。此字段可选，仅在更新更改了属于 REPLICA IDENTITY 索引的某一列或多列的数据时出现。 Byte1('O') 将后续 TupleData 子消息标识为旧元组。此字段可选，仅在发生更新的表将 REPLICA IDENTITY 设为 FULL 时出现。 TupleData 表示旧元组或主键内容的 TupleData 消息部分。仅在前面的'O'或'K'部分存在时出现。 Byte1('N') 将后续 TupleData 消息标识为新元组。 TupleData 表示新元组内容的 TupleData 消息部分。 Update 消息可以包含 'K' 消息部分或 'O' 消息部分，也可以两者都不包含，但绝不会同时包含两者。","description_zh_html":"\u003cp\u003e协议消息 Update。\u003c/p\u003e\u003ch3\u003e同版本中文手册定义\u003c/h3\u003e\u003cdd\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('U')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         将该消息标识为 Update 消息。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32 (TransactionId)\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         事务的 Xid（仅在流式传输的事务中出现）。此字段从协议版本 2 起可用。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32 (Oid)\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         关系的 OID，与 Relation 消息中的 ID 对应。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('K')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         将后续 TupleData 子消息标识为键。此字段可选，仅在更新更改了属于 REPLICA IDENTITY 索引的某一列或多列的数据时出现。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('O')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         将后续 TupleData 子消息标识为旧元组。此字段可选，仅在发生更新的表将 REPLICA IDENTITY 设为 FULL 时出现。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eTupleData\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         表示旧元组或主键内容的 TupleData 消息部分。仅在前面的'O'或'K'部分存在时出现。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('N')\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         将后续 TupleData 消息标识为新元组。\n        \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003eTupleData\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n         表示新元组内容的 TupleData 消息部分。\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e\n      Update 消息可以包含 'K' 消息部分或 'O' 消息部分，也可以两者都不包含，但绝不会同时包含两者。\n     \u003c/p\u003e\u003c/dd\u003e\u003cp\u003e\u003ca href=\"/zh/docs/18/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","facts":[{"label":"Layer","value":"Logical replication payload; distinct from the frontend/backend message envelope"},{"label":"First field","value":"Byte1('U')"}],"facts_zh":[{"label":"层次","value":"逻辑复制载荷，与前后端消息封装分开。"},{"label":"首个字段","value":"Byte1('U')"}],"fields":[{"description":"Identifies the message as an update message.","format":"Byte1('U')"},{"description":"Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.","format":"Int32 (TransactionId)"},{"description":"OID of the relation corresponding to the ID in the relation message.","format":"Int32 (Oid)"},{"description":"Identifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index.","format":"Byte1('K')"},{"description":"Identifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL.","format":"Byte1('O')"},{"description":"TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.","format":"TupleData"},{"description":"Identifies the following TupleData message as a new tuple.","format":"Byte1('N')"},{"description":"TupleData message part representing the contents of a new tuple.","format":"TupleData"}],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('U')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as an update message.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32 (TransactionId)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eXid of the transaction (only present for streamed transactions). This field is available since protocol version 2.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32 (Oid)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOID of the relation corresponding to the ID in the relation message.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('K')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('O')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eTupleData\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('N')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData message as a new tuple.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eTupleData\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTupleData message part representing the contents of a new tuple.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eThe Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.\u003c/p\u003e\n\u003c/dd\u003e\u003c/dl\u003e","manual_path":"/docs/18/protocol-logicalrep-message-formats.html","related":[{"label":"Streaming replication protocol","url":"/docs/18/protocol-replication.html"},{"label":"Logical Decoding Plugins","url":"/wiki/decode/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[{"paragraphs":["This section describes the detailed format of each logical replication message. These messages are either returned by the replication slot SQL interface or are sent by a walsender. In the case of a walsender, they are encapsulated inside replication protocol WAL messages as described in Section 54.4 , and generally obey the same message flow as physical replication. The following messages (Stream Start, Stream Stop, Stream Commit, and Stream Abort) are available since protocol version 2. The following messages (Begin Prepare, Prepare, Commit Prepared, Rollback Prepared, Stream Prepare) are available since protocol version 3. The following message parts are shared by the above messages."],"title":"Protocol context"}],"sections_zh":[{"paragraphs":["本节说明各逻辑复制消息的详细格式。这些消息由复制槽 SQL 接口返回，或由 walsender 发送。由 walsender 发送时，它们被封装在复制协议的 WAL 消息中（参见第 54.4 节），消息流程通常与物理复制相同。Stream Start、Stream Stop、Stream Commit 和 Stream Abort 从协议版本 2 起可用。Begin Prepare、Prepare、Commit Prepared、Rollback Prepared 和 Stream Prepare 从协议版本 3 起可用。以下消息部分为上述消息所共用。"],"title":"协议上下文"}],"signature":"Update","sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-logicalrep-message-formats.html","sha256":"e976b008206820fbeb1eba226e69bb7c00af157372c3545375d1b5053c76d0ad","url":"/docs/18/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('U')","c2":"Identifies the message as an update message."},{"c0":"2","c1":"Int32 (TransactionId)","c2":"Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."},{"c0":"3","c1":"Int32 (Oid)","c2":"OID of the relation corresponding to the ID in the relation message."},{"c0":"4","c1":"Byte1('K')","c2":"Identifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index."},{"c0":"5","c1":"Byte1('O')","c2":"Identifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL."},{"c0":"6","c1":"TupleData","c2":"TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present."},{"c0":"7","c1":"Byte1('N')","c2":"Identifies the following TupleData message as a new tuple."},{"c0":"8","c1":"TupleData","c2":"TupleData message part representing the contents of a new tuple."}],"title":"Fields in documented order"}],"tables_zh":[{"columns":[{"key":"c0","label":"位置"},{"key":"c1","label":"格式"},{"key":"c2","label":"含义"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('U')","c2":"将该消息标识为 Update 消息。"},{"c0":"2","c1":"Int32 (TransactionId)","c2":"事务的 XID，仅在流式传输事务中出现。此字段从协议版本 2 起可用。"},{"c0":"3","c1":"Int32 (Oid)","c2":"关系的 OID，与 Relation 消息中的 ID 对应。"},{"c0":"4","c1":"Byte1('K')","c2":"将后续 TupleData 子消息标识为键。此字段可选，仅在更新更改了属于 REPLICA IDENTITY 索引的某一列或多列的数据时出现。"},{"c0":"5","c1":"Byte1('O')","c2":"将后续 TupleData 子消息标识为旧元组。此字段可选，仅在发生更新的表将 REPLICA IDENTITY 设为 FULL 时出现。"},{"c0":"6","c1":"TupleData","c2":"表示旧元组或主键内容的 TupleData 消息部分。仅在前面的'O'或'K'部分存在时出现。"},{"c0":"7","c1":"Byte1('N')","c2":"将后续 TupleData 消息标识为新元组。"},{"c0":"8","c1":"TupleData","c2":"表示新元组内容的 TupleData 消息部分。"}],"title":"按手册顺序排列的字段"}],"zh_from":{"authored_translation":"source-derived-identity","body_sha256":"816df256220b7949473b68e7ba472c30ef44633f4f844d4a3e213062e1023a65","kind":"same-version-chinese-manual-with-source-derived-identity","manual":{"anchor":"PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE","build_id":107,"extraction":"exact-definition","fragment_sha256":"d3d365de8fcc4f50868778cdd4ec34d3e0ad1b52b54e87260b492793f9d60f68","locale":"zh-Hans","page_key":"protocol-logicalrep-message-formats.html","source_hash":"9561d3a39aca911a61b68b188aa97828e60fb6f7d81323d8aada08fe67259039","source_revision":"unknown:rendered-translation-baseline","translated_from_revision":null,"translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","url":"/zh/docs/18/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE","version":"18"},"runtime_rerun":false,"source_facts_revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}},"ManualEvidence":{"manual_path":"/docs/18/protocol-logicalrep-message-formats.html","release":{"channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"PostgreSQL 18 English manual","path":"protocol-logicalrep-message-formats.html","sha256":"e976b008206820fbeb1eba226e69bb7c00af157372c3545375d1b5053c76d0ad","url":"/docs/18/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE"}]},"MeasuredEvidence":{}},"Text":{"Collection":"protocol","Key":"logical-update","SourceDatabase":"center","Version":"18","Locale":"en","Title":"Update (logical replication)","Summary":"Logical replication Update format. Identifies the message as an update message.","BodyHTML":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;U\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as an update message.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt32 (TransactionId)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eXid of the transaction (only present for streamed transactions). This field is available since protocol version 2.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eInt32 (Oid)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOID of the relation corresponding to the ID in the relation message.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;K\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;O\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eTupleData\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTupleData message part representing the contents of the old tuple or primary key. Only present if the previous \u0026#39;O\u0026#39; or \u0026#39;K\u0026#39; part is present.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eByte1(\u0026#39;N\u0026#39;)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData message as a new tuple.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003eTupleData\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTupleData message part representing the contents of a new tuple.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eThe Update message may contain either a \u0026#39;K\u0026#39; message part or an \u0026#39;O\u0026#39; message part or neither of them, but never both of them.\u003c/p\u003e\n\u003c/dd\u003e\u003c/dl\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"d000bb382fdf088e780e56231fc2f20b032d3a8250d0f110e38ed91388ee48a2","Payload":{"description":["Logical replication Update format. Identifies the message as an update message."],"manual_html":"\u003cdl\u003e\u003cdd\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('U')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the message as an update message.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32 (TransactionId)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eXid of the transaction (only present for streamed transactions). This field is available since protocol version 2.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eInt32 (Oid)\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOID of the relation corresponding to the ID in the relation message.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('K')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('O')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eTupleData\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eByte1('N')\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eIdentifies the following TupleData message as a new tuple.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003eTupleData\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTupleData message part representing the contents of a new tuple.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cp\u003eThe Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.\u003c/p\u003e\n\u003c/dd\u003e\u003c/dl\u003e","related":[{"label":"Streaming replication protocol","url":"/docs/18/protocol-replication.html"},{"label":"Logical Decoding Plugins","url":"/wiki/decode/?v=18"}],"sections":[{"paragraphs":["This section describes the detailed format of each logical replication message. These messages are either returned by the replication slot SQL interface or are sent by a walsender. In the case of a walsender, they are encapsulated inside replication protocol WAL messages as described in Section 54.4 , and generally obey the same message flow as physical replication. The following messages (Stream Start, Stream Stop, Stream Commit, and Stream Abort) are available since protocol version 2. The following messages (Begin Prepare, Prepare, Commit Prepared, Rollback Prepared, Stream Prepare) are available since protocol version 3. The following message parts are shared by the above messages."],"title":"Protocol context"}],"tables":[{"columns":[{"key":"c0","label":"Position"},{"key":"c1","label":"Format"},{"key":"c2","label":"Meaning"}],"key":"fields","rows":[{"c0":"1","c1":"Byte1('U')","c2":"Identifies the message as an update message."},{"c0":"2","c1":"Int32 (TransactionId)","c2":"Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."},{"c0":"3","c1":"Int32 (Oid)","c2":"OID of the relation corresponding to the ID in the relation message."},{"c0":"4","c1":"Byte1('K')","c2":"Identifies the following TupleData submessage as a key. This field is optional and is only present if the update changed data in any of the column(s) that are part of the REPLICA IDENTITY index."},{"c0":"5","c1":"Byte1('O')","c2":"Identifies the following TupleData submessage as an old tuple. This field is optional and is only present if table in which the update happened has REPLICA IDENTITY set to FULL."},{"c0":"6","c1":"TupleData","c2":"TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present."},{"c0":"7","c1":"Byte1('N')","c2":"Identifies the following TupleData message as a new tuple."},{"c0":"8","c1":"TupleData","c2":"TupleData message part representing the contents of a new tuple."}],"title":"Fields in documented order"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
