{"kind": "protocol", "major": "18", "item": {"slug": "logical-begin-prepare", "name": "Begin Prepare (logical replication)", "name_zh": "", "category": "Logical replication formats", "summary": "Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message.", "aliases": ["Begin Prepare"], "content_hash": "f477550596cdfe70a3781e3e66179e4f7b58b6db6084b3775221e9ad1ee38f68", "versions": {"15": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/15/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}, "16": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/16/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}, "17": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/17/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}, "18": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/18/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}, "19": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/19/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}, "20": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/devel/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}}}, "snapshot": {"facts": [{"label": "Layer", "value": "Logical replication payload; distinct from the frontend/backend message envelope"}, {"label": "First field", "value": "Byte1('b')"}], "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}], "tables": [{"key": "fields", "rows": [{"c0": "1", "c1": "Byte1('b')", "c2": "Identifies the message as the beginning of a prepared transaction message."}, {"c0": "2", "c1": "Int64 (XLogRecPtr)", "c2": "The LSN of the prepare."}, {"c0": "3", "c1": "Int64 (XLogRecPtr)", "c2": "The end LSN of the prepared transaction."}, {"c0": "4", "c1": "Int64 (TimestampTz)", "c2": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"c0": "5", "c1": "Int32 (TransactionId)", "c2": "Xid of the transaction."}, {"c0": "6", "c1": "String", "c2": "The user defined GID of the prepared transaction."}], "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-BEGIN-PREPARE", "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": "Begin Prepare", "description": ["Logical replication Begin Prepare format. Identifies the message as the beginning of a prepared transaction message."], "manual_html": "<dl><dd>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">Byte1('b')</span></dt>\n<dd>\n<p>Identifies the message as the beginning of a prepared transaction message.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The LSN of the prepare.</p>\n</dd>\n<dt><span class=\"term\">Int64 (XLogRecPtr)</span></dt>\n<dd>\n<p>The end LSN of the prepared transaction.</p>\n</dd>\n<dt><span class=\"term\">Int64 (TimestampTz)</span></dt>\n<dd>\n<p>Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01).</p>\n</dd>\n<dt><span class=\"term\">Int32 (TransactionId)</span></dt>\n<dd>\n<p>Xid of the transaction.</p>\n</dd>\n<dt><span class=\"term\">String</span></dt>\n<dd>\n<p>The user defined GID of the prepared transaction.</p>\n</dd>\n</dl>\n</div>\n</dd></dl>", "manual_path": "/docs/18/protocol-logicalrep-message-formats.html", "comparison_data": {"layer": "logical replication", "fields": [{"format": "Byte1('b')", "description": "Identifies the message as the beginning of a prepared transaction message."}, {"format": "Int64 (XLogRecPtr)", "description": "The LSN of the prepare."}, {"format": "Int64 (XLogRecPtr)", "description": "The end LSN of the prepared transaction."}, {"format": "Int64 (TimestampTz)", "description": "Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01)."}, {"format": "Int32 (TransactionId)", "description": "Xid of the transaction."}, {"format": "String", "description": "The user defined GID of the prepared transaction."}]}, "comparison_hash": "ebbadffad274f32ca3ebb47547183a539df75076cba41b6df18e3b0e4c152c22"}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}