{"kind": "protocol", "major": "18", "item": {"slug": "logical-update", "name": "Update (logical replication)", "name_zh": "", "category": "Logical replication formats", "summary": "Logical replication Update format. Identifies the message as an update message.", "aliases": ["Update"], "content_hash": "c3a2e35bb35bb7ed0de62279516b94bca5859e4384d51090cd8f0709b3c260a0", "versions": {"10": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('U')", "c2": "Identifies the message as an update message."}, {"c0": "2", "c1": "Int32", "c2": "ID of the relation corresponding to the ID in the relation message."}, {"c0": "3", "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": "4", "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": "5", "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": "6", "c1": "Byte1('N')", "c2": "Identifies the following TupleData message as a new tuple."}, {"c0": "7", "c1": "TupleData", "c2": "TupleData message part representing the contents of a new tuple."}], "title": "Fields in documented order", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/10/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=10", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "label": "10.23", "major": "10", "channel": "stable", "revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "sources": [{"url": "/docs/10/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 10 English manual", "sha256": "d59789e57fb3bfca55c805338f0883d2569b3a32490546294e2b60f3d8cd6d64"}], "sections": [{"title": "Protocol context", "paragraphs": ["This section describes the detailed format of each logical replication message. These messages are returned either by the replication slot SQL interface or are sent by a walsender. In case of a walsender they are encapsulated inside the replication protocol WAL messages as described in Section 52.4 and generally obey same message flow as physical replication. The following message parts are shared by the above messages."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32</span></dt>\n<dd>\n<p>ID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/10/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "9b86a6eb794645ac06f40692ab2b1af21eb8531415143306bb50cf467fca43df"}, "11": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('U')", "c2": "Identifies the message as an update message."}, {"c0": "2", "c1": "Int32", "c2": "ID of the relation corresponding to the ID in the relation message."}, {"c0": "3", "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": "4", "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": "5", "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": "6", "c1": "Byte1('N')", "c2": "Identifies the following TupleData message as a new tuple."}, {"c0": "7", "c1": "TupleData", "c2": "TupleData message part representing the contents of a new tuple."}], "title": "Fields in documented order", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/11/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=11", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "stable", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sources": [{"url": "/docs/11/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 11 English manual", "sha256": "398afd7945b4d61facda275c78067baa3f49d65bfd2ca840fbe3074533403b62"}], "sections": [{"title": "Protocol context", "paragraphs": ["This section describes the detailed format of each logical replication message. These messages are returned either by the replication slot SQL interface or are sent by a walsender. In case of a walsender they are encapsulated inside the replication protocol WAL messages as described in Section 53.4 and generally obey same message flow as physical replication. The following message parts are shared by the above messages."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32</span></dt>\n<dd>\n<p>ID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/11/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "9b86a6eb794645ac06f40692ab2b1af21eb8531415143306bb50cf467fca43df"}, "12": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('U')", "c2": "Identifies the message as an update message."}, {"c0": "2", "c1": "Int32", "c2": "ID of the relation corresponding to the ID in the relation message."}, {"c0": "3", "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": "4", "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": "5", "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": "6", "c1": "Byte1('N')", "c2": "Identifies the following TupleData message as a new tuple."}, {"c0": "7", "c1": "TupleData", "c2": "TupleData message part representing the contents of a new tuple."}], "title": "Fields in documented order", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/12/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=12", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "stable", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "/docs/12/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 12 English manual", "sha256": "8c2e615799c7af869e31164cdf7d82d5ec7526abfe0ec84a35c4553bc8b2e9dc"}], "sections": [{"title": "Protocol context", "paragraphs": ["This section describes the detailed format of each logical replication message. These messages are returned either by the replication slot SQL interface or are sent by a walsender. In case of a walsender they are encapsulated inside the replication protocol WAL messages as described in Section 52.4 and generally obey same message flow as physical replication. The following message parts are shared by the above messages."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32</span></dt>\n<dd>\n<p>ID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/12/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "9b86a6eb794645ac06f40692ab2b1af21eb8531415143306bb50cf467fca43df"}, "13": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('U')", "c2": "Identifies the message as an update message."}, {"c0": "2", "c1": "Int32", "c2": "ID of the relation corresponding to the ID in the relation message."}, {"c0": "3", "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": "4", "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": "5", "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": "6", "c1": "Byte1('N')", "c2": "Identifies the following TupleData message as a new tuple."}, {"c0": "7", "c1": "TupleData", "c2": "TupleData message part representing the contents of a new tuple."}], "title": "Fields in documented order", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/13/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=13", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "stable", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "/docs/13/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 13 English manual", "sha256": "c740d4c528ea137a87c0f9bf8ea8859fe6707c758374a12bc3c2390ac35427f1"}], "sections": [{"title": "Protocol context", "paragraphs": ["This section describes the detailed format of each logical replication message. These messages are returned either by the replication slot SQL interface or are sent by a walsender. In case of a walsender they are encapsulated inside the replication protocol WAL messages as described in Section 52.4 and generally obey same message flow as physical replication. The following message parts are shared by the above messages."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32</span></dt>\n<dd>\n<p>ID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/13/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "9b86a6eb794645ac06f40692ab2b1af21eb8531415143306bb50cf467fca43df"}, "14": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('U')", "c2": "Identifies the message as an update message."}, {"c0": "2", "c1": "Int32", "c2": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"c0": "3", "c1": "Int32", "c2": "ID 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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/14/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=14", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "/docs/14/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 14 English manual", "sha256": "4d5309e6070938fb53a3380c66fb64152d7984a368c86536d69ecac5bdb42852"}], "sections": [{"title": "Protocol context", "paragraphs": ["This section describes the detailed format of each logical replication message. These messages are returned either by the replication slot SQL interface or are sent by a walsender. In case of a walsender they are encapsulated inside the replication protocol WAL messages as described in Section 53.4 and generally obey 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 message parts are shared by the above messages."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32</span></dt>\n<dd>\n<p>ID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/14/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32", "description": "ID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "164d972b06aaa5013fbc9f29d9bccffc2b68082464ff1a30bf86d7a987433af3"}, "15": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/15/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=15", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "/docs/15/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 15 English manual", "sha256": "dce726e09e3bfedfcea89e211772f1afb48a00fd03f33fb94ce66e6d6e2938f5"}], "sections": [{"title": "Protocol context", "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 55.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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/15/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}, "16": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/16/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=16", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "/docs/16/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 16 English manual", "sha256": "23e3687e7c97c6a17a24684c30716fb7beed99c85967e828f4ee378effb5b50e"}], "sections": [{"title": "Protocol context", "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 55.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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/16/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}, "17": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/17/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=17", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "/docs/17/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 17 English manual", "sha256": "438b6a09f48bd0e9d2424559a0ab950dce44a9ab6573d362362c1c8d0b375fe3"}], "sections": [{"title": "Protocol context", "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 53.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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/17/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}, "18": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/18/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=18", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 18 English manual", "sha256": "e976b008206820fbeb1eba226e69bb7c00af157372c3545375d1b5053c76d0ad"}], "sections": [{"title": "Protocol context", "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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/18/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}, "19": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/19/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=19", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "/docs/19/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 19 English manual", "sha256": "e09479de1e9cef5a4abc9703d423b68677f7f7e0e44c1098a2d37144980fd461"}], "sections": [{"title": "Protocol context", "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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/19/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}, "20": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/devel/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=20", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "/docs/devel/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 20 English manual", "sha256": "1c5d9d7ff344de5d066562bb12e9db460a51b7713932ca201856714fa9477238"}], "sections": [{"title": "Protocol context", "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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/devel/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}}}, "snapshot": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('U')"}], "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}], "tables": [{"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", "columns": [{"key": "c0", "label": "Position"}, {"key": "c1", "label": "Format"}, {"key": "c2", "label": "Meaning"}]}], "related": [{"url": "/docs/18/protocol-replication.html", "label": "Streaming replication protocol"}, {"url": "/wiki/decode/?v=18", "label": "Logical Decoding Plugins"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/protocol-logicalrep-message-formats.html#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-UPDATE", "path": "protocol-logicalrep-message-formats.html", "label": "PostgreSQL 18 English manual", "sha256": "e976b008206820fbeb1eba226e69bb7c00af157372c3545375d1b5053c76d0ad"}], "sections": [{"title": "Protocol context", "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."]}], "signature": "Update", "description": ["Logical replication Update format. Identifies the message as an update message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('U')</span></dt>\n<dd>\n<p>Identifies the message as an update message.</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.</p>\n</dd>\n<dt><span class=\"term\">Int32 (Oid)</span></dt>\n<dd>\n<p>OID of the relation corresponding to the ID in the relation message.</p>\n</dd>\n<dt><span class=\"term\">Byte1('K')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">Byte1('O')</span></dt>\n<dd>\n<p>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.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of the old tuple or primary key. Only present if the previous 'O' or 'K' part is present.</p>\n</dd>\n<dt><span class=\"term\">Byte1('N')</span></dt>\n<dd>\n<p>Identifies the following TupleData message as a new tuple.</p>\n</dd>\n<dt><span class=\"term\">TupleData</span></dt>\n<dd>\n<p>TupleData message part representing the contents of a new tuple.</p>\n</dd>\n</dl>\n</div>\n<p>The Update message may contain either a 'K' message part or an 'O' message part or neither of them, but never both of them.</p>\n</dd></dl>", "manual_path": "/docs/18/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('U')", "description": "Identifies the message as an update message."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2."}, {"format": "Int32 (Oid)", "description": "OID of the relation corresponding to the ID in the relation message."}, {"format": "Byte1('K')", "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('O')", "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": "TupleData", "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": "Byte1('N')", "description": "Identifies the following TupleData message as a new tuple."}, {"format": "TupleData", "description": "TupleData message part representing the contents of a new tuple."}]}, "comparison_hash": "6b282d9719d73ff0de8c7d645b2d2b4c79ba39a71c6725c75afc058e06a40b77"}, "comparison": {"left": "13", "right": "14", "status": "changed", "diff": "--- PostgreSQL 13\n+++ PostgreSQL 14\n@@ -3,6 +3,10 @@\n     {\n       \"description\": \"Identifies the message as an update message.\",\n       \"format\": \"Byte1('U')\"\n+    },\n+    {\n+      \"description\": \"Xid of the transaction (only present for streamed transactions). This field is available since protocol version 2.\",\n+      \"format\": \"Int32\"\n     },\n     {\n       \"description\": \"ID of the relation corresponding to the ID in the relation message.\","}}