{"kind": "decode", "major": "18", "item": {"slug": "pgoutput", "name": "pgoutput", "name_zh": "Core replication", "category": "\u6838\u5fc3\u590d\u5236", "summary": "PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002", "aliases": [], "content_hash": "430dd76cb2c82590d550546432580c91cf49d2329b24ef2d9952fc19db835867", "versions": {"10": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "6"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u4ec5\u652f\u6301\u7248\u672c 1 \u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "proto_version"}, {"name": "publication_names"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/10/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=10", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=10", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=10", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}], "release": {"ref": "PostgreSQL 10.23 source archive", "label": "10.23", "major": "10", "channel": "historical", "revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9", "source_url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/10/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 10 English manual", "sha256": "482a3652a629e1e1ba6c0c8bf057a3bb6daed03fb1e6b5645810a1ac6277ad7a", "language": "en", "original_url": "/docs/10/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "line": 76, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:76", "sha256": "5de5619f25e44e4084481c4a6465cfb90f5b13c00a37fd1f0ea2f8a43cc9986e", "archive_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, {"url": "https://pg.center/docs/10/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 10 English manual", "sha256": "c023fc2750375bbd45d810f49639e224a847e4ee32db70bdc154b26c397498bc", "language": "en", "original_url": "/docs/10/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "fcb4f0e0f869e6b5bcf80546759b82c9b3582043857dd9986852dbc8aee06798", "archive_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tAssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit);\n\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->commit_cb = pgoutput_commit_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "filter_by_origin_cb": "pgoutput_origin_filter"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">52.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">52.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u7684<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\u63a5\u53d7\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u4ec5\u652f\u6301\u7248\u672c <code class=\"literal\">1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">52.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/10/protocol-logicalrep-message-formats.html\" title=\"52.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a052.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">52.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u9010\u4e2a\u53d1\u9001\u4e8b\u52a1\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u548c Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/10/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/10/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "bf36c34c9627ddcbc33e207ad4901dba4b3385c35b00fcd01e5eea61897baa05", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/div[2]/dl[0]/dd[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]"]}], "language": "zh", "original_text": {"/versions/10/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/10/facts/0/label": "Interface family", "/versions/10/facts/0/value": "Logical-decoding output plugin", "/versions/10/facts/1/label": "Handler or routine", "/versions/10/facts/2/label": "Recorded callbacks", "/versions/10/tables/0/title": "Registered interface handlers", "/versions/10/tables/1/title": "Documented options", "/versions/10/tables/2/title": "Option names recognized by this plugin build", "/versions/10/related/0/label": "Logical decoding output interface", "/versions/10/related/1/label": "Existing extension catalogue identity", "/versions/10/related/2/label": "Logical Begin message", "/versions/10/related/3/label": "Logical Relation message", "/versions/10/related/4/label": "Logical tuple representation", "/versions/10/sections/0/title": "Interface and capability boundaries", "/versions/10/sections/1/title": "Output and protocol boundaries", "/versions/10/sections/2/title": "Registered implementation in core source", "/versions/10/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/10/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/3/state": "No handler registered in this build", "/versions/10/tables/0/rows/4/state": "No handler registered in this build", "/versions/10/tables/0/rows/5/state": "No handler registered in this build", "/versions/10/tables/0/rows/6/state": "No handler registered in this build", "/versions/10/tables/0/rows/7/state": "No handler registered in this build", "/versions/10/tables/0/rows/8/state": "No handler registered in this build", "/versions/10/tables/0/rows/9/state": "No handler registered in this build", "/versions/10/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/10/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/10/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/10/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/10/tables/0/rows/0/feature": "Begin transaction", "/versions/10/tables/0/rows/1/feature": "Row changes", "/versions/10/tables/0/rows/4/feature": "Logical messages", "/versions/10/tables/0/rows/5/feature": "Start streamed transaction", "/versions/10/tables/0/rows/6/feature": "Stream row changes", "/versions/10/tables/0/rows/7/feature": "Prepare transaction", "/versions/10/tables/0/rows/8/feature": "Commit prepared", "/versions/10/tables/0/rows/9/feature": "Rollback prepared", "/versions/10/tables/0/columns/0/label": "Interface operation", "/versions/10/tables/0/columns/1/label": "Source observation", "/versions/10/tables/0/columns/2/label": "Callback", "/versions/10/tables/0/columns/3/label": "Implementation", "/versions/10/tables/1/columns/0/label": "Option", "/versions/10/tables/1/columns/1/label": "Same-version definition", "/versions/10/tables/2/columns/0/label": "Source option name", "/versions/10/tables/1/rows/0/definition": "Protocol version. Currently only version 1 is supported.", "/versions/10/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed.", "/versions/10/tables/0/rows/3/implementation": "Not registered", "/versions/10/tables/0/rows/4/implementation": "Not registered", "/versions/10/tables/0/rows/5/implementation": "Not registered", "/versions/10/tables/0/rows/6/implementation": "Not registered", "/versions/10/tables/0/rows/7/implementation": "Not registered", "/versions/10/tables/0/rows/8/implementation": "Not registered", "/versions/10/tables/0/rows/9/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "bec788661f58cc8de52bbd14faa851fb6aca3b2fb91f21ad7d279301153eba71"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently only version 1 is supported."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "filter_by_origin_cb": "pgoutput_origin_filter"}, "source_options": ["proto_version", "publication_names"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1"}}, "comparison_hash": "0aedb7aff9c6ae921c284af0b0cb8efe1460933e81b0608192b68ca8be9c1ab3", "manual_language": "zh", "runtime_verified": false}, "11": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "7"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u4ec5\u652f\u6301\u7248\u672c 1 \u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "proto_version"}, {"name": "publication_names"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/11/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=11", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=11", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=11", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}], "release": {"ref": "PostgreSQL 11.22 source archive", "label": "11.22", "major": "11", "channel": "historical", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0", "source_url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/11/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 11 English manual", "sha256": "e407a7f8617f41582d64119f002b64da565da6ab4b4128c4fe45a59db8b70c79", "language": "en", "original_url": "/docs/11/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "line": 78, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:78", "sha256": "e6deb5f7135f5f67899429e60d5a6bfc445a5421c13428ade4010ea99f0c8972", "archive_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, {"url": "https://pg.center/docs/11/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 11 English manual", "sha256": "69b72c5a11a8905c173c8db4a5322f1d58e7876cbc706c7f4feb99402b6ab274", "language": "en", "original_url": "/docs/11/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "2a9e8cef369b4b4a26f603bba781c7cd567aa7d014186589c98b177613eff545", "archive_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tAssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit);\n\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->commit_cb = pgoutput_commit_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">53.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">53.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u7684<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\u63a5\u53d7\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u4ec5\u652f\u6301\u7248\u672c <code class=\"literal\">1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">53.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/11/protocol-logicalrep-message-formats.html\" title=\"53.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a053.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">53.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u9010\u4e2a\u53d1\u9001\u4e8b\u52a1\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u548c Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/11/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/11/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "afb90a2dadf19260c604ea517635827c5f9a53e9265ee2e24aa05ddb8fded282", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/div[2]/dl[0]/dd[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/11/facts/0/label": "Interface family", "/versions/11/facts/0/value": "Logical-decoding output plugin", "/versions/11/facts/1/label": "Handler or routine", "/versions/11/facts/2/label": "Recorded callbacks", "/versions/11/tables/0/title": "Registered interface handlers", "/versions/11/tables/1/title": "Documented options", "/versions/11/tables/2/title": "Option names recognized by this plugin build", "/versions/11/related/0/label": "Logical decoding output interface", "/versions/11/related/1/label": "Existing extension catalogue identity", "/versions/11/related/2/label": "Logical Begin message", "/versions/11/related/3/label": "Logical Relation message", "/versions/11/related/4/label": "Logical tuple representation", "/versions/11/sections/0/title": "Interface and capability boundaries", "/versions/11/sections/1/title": "Output and protocol boundaries", "/versions/11/sections/2/title": "Registered implementation in core source", "/versions/11/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/11/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/4/state": "No handler registered in this build", "/versions/11/tables/0/rows/5/state": "No handler registered in this build", "/versions/11/tables/0/rows/6/state": "No handler registered in this build", "/versions/11/tables/0/rows/7/state": "No handler registered in this build", "/versions/11/tables/0/rows/8/state": "No handler registered in this build", "/versions/11/tables/0/rows/9/state": "No handler registered in this build", "/versions/11/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/11/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/11/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/11/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/11/tables/0/rows/0/feature": "Begin transaction", "/versions/11/tables/0/rows/1/feature": "Row changes", "/versions/11/tables/0/rows/4/feature": "Logical messages", "/versions/11/tables/0/rows/5/feature": "Start streamed transaction", "/versions/11/tables/0/rows/6/feature": "Stream row changes", "/versions/11/tables/0/rows/7/feature": "Prepare transaction", "/versions/11/tables/0/rows/8/feature": "Commit prepared", "/versions/11/tables/0/rows/9/feature": "Rollback prepared", "/versions/11/tables/0/columns/0/label": "Interface operation", "/versions/11/tables/0/columns/1/label": "Source observation", "/versions/11/tables/0/columns/2/label": "Callback", "/versions/11/tables/0/columns/3/label": "Implementation", "/versions/11/tables/1/columns/0/label": "Option", "/versions/11/tables/1/columns/1/label": "Same-version definition", "/versions/11/tables/2/columns/0/label": "Source option name", "/versions/11/tables/1/rows/0/definition": "Protocol version. Currently only version 1 is supported.", "/versions/11/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed.", "/versions/11/tables/0/rows/4/implementation": "Not registered", "/versions/11/tables/0/rows/5/implementation": "Not registered", "/versions/11/tables/0/rows/6/implementation": "Not registered", "/versions/11/tables/0/rows/7/implementation": "Not registered", "/versions/11/tables/0/rows/8/implementation": "Not registered", "/versions/11/tables/0/rows/9/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "fadc66ee0c1bfcb5f8546e535543f51808098fd8ccc1d0b4ebfaf31fc0e98ada"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently only version 1 is supported."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "source_options": ["proto_version", "publication_names"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1"}}, "comparison_hash": "d5b89f0ab347e450fe25944edd36f88a3ed8974573075374de94ee865149c73d", "manual_language": "zh", "runtime_verified": false}, "12": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "7"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u53ea\u652f\u6301\u7248\u672c 1 \u3002\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7684\u7248\u672c\u53f7\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "proto_version"}, {"name": "publication_names"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/12/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=12", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=12", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=12", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}], "release": {"ref": "PostgreSQL 12.22 source archive", "label": "12.22", "major": "12", "channel": "historical", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b", "source_url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/12/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 12 English manual", "sha256": "3e244d08ef9497ae1aeddd890a46e88b71e4cf37cfae4aa00f4b886001d98a61", "language": "en", "original_url": "/docs/12/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "line": 78, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:78", "sha256": "de46941d14a8b988b06b7638f5d451d4d7549a47c16741bab26690ba4c316755", "archive_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, {"url": "https://pg.center/docs/12/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 12 English manual", "sha256": "996af632b11f48ee4f102c7b63c8bf6a2f0e2b6debc1bc76d34a27775c0556b1", "language": "en", "original_url": "/docs/12/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "05c3c4a5bf0de4ae6ba74e668b5a4a368e69ba6a31c5046993a770a62cb8ce5d", "archive_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tAssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit);\n\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->commit_cb = pgoutput_commit_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">52.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">52.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u53ea\u652f\u6301\u7248\u672c <code class=\"literal\">1</code>\u3002\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7684\u7248\u672c\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">52.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/12/protocol-logicalrep-message-formats.html\" title=\"52.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a052.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">52.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u9010\u4e2a\u53d1\u9001\u4e8b\u52a1\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u548c Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/12/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "8bea4f948a7791bb0fa476b77b6e6f63888bd119cbf3472a22dad384dfcc5181", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/12/facts/0/label": "Interface family", "/versions/12/facts/0/value": "Logical-decoding output plugin", "/versions/12/facts/1/label": "Handler or routine", "/versions/12/facts/2/label": "Recorded callbacks", "/versions/12/tables/0/title": "Registered interface handlers", "/versions/12/tables/1/title": "Documented options", "/versions/12/tables/2/title": "Option names recognized by this plugin build", "/versions/12/related/0/label": "Logical decoding output interface", "/versions/12/related/1/label": "Existing extension catalogue identity", "/versions/12/related/2/label": "Logical Begin message", "/versions/12/related/3/label": "Logical Relation message", "/versions/12/related/4/label": "Logical tuple representation", "/versions/12/sections/0/title": "Interface and capability boundaries", "/versions/12/sections/1/title": "Output and protocol boundaries", "/versions/12/sections/2/title": "Registered implementation in core source", "/versions/12/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/12/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/4/state": "No handler registered in this build", "/versions/12/tables/0/rows/5/state": "No handler registered in this build", "/versions/12/tables/0/rows/6/state": "No handler registered in this build", "/versions/12/tables/0/rows/7/state": "No handler registered in this build", "/versions/12/tables/0/rows/8/state": "No handler registered in this build", "/versions/12/tables/0/rows/9/state": "No handler registered in this build", "/versions/12/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/12/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/12/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/12/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/12/tables/0/rows/0/feature": "Begin transaction", "/versions/12/tables/0/rows/1/feature": "Row changes", "/versions/12/tables/0/rows/4/feature": "Logical messages", "/versions/12/tables/0/rows/5/feature": "Start streamed transaction", "/versions/12/tables/0/rows/6/feature": "Stream row changes", "/versions/12/tables/0/rows/7/feature": "Prepare transaction", "/versions/12/tables/0/rows/8/feature": "Commit prepared", "/versions/12/tables/0/rows/9/feature": "Rollback prepared", "/versions/12/tables/0/columns/0/label": "Interface operation", "/versions/12/tables/0/columns/1/label": "Source observation", "/versions/12/tables/0/columns/2/label": "Callback", "/versions/12/tables/0/columns/3/label": "Implementation", "/versions/12/tables/1/columns/0/label": "Option", "/versions/12/tables/1/columns/1/label": "Same-version definition", "/versions/12/tables/2/columns/0/label": "Source option name", "/versions/12/tables/1/rows/0/definition": "Protocol version. Currently only version 1 is supported. A valid version is required.", "/versions/12/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/12/tables/0/rows/4/implementation": "Not registered", "/versions/12/tables/0/rows/5/implementation": "Not registered", "/versions/12/tables/0/rows/6/implementation": "Not registered", "/versions/12/tables/0/rows/7/implementation": "Not registered", "/versions/12/tables/0/rows/8/implementation": "Not registered", "/versions/12/tables/0/rows/9/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "f87c89828d71caadd32ee36a8aa6600bbb8c87f884e0ee2cb15119b37ac1bcc2"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently only version 1 is supported. A valid version is required."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "source_options": ["proto_version", "publication_names"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1"}}, "comparison_hash": "e720ae3ea46eba4407a3ce10d76e43106f01751c003969f51e58093113752821", "manual_language": "zh", "runtime_verified": false}, "13": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "7"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u53ea\u652f\u6301\u7248\u672c 1 \u3002\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7684\u7248\u672c\u53f7\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "proto_version"}, {"name": "publication_names"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/13/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=13", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=13", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=13", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}], "release": {"ref": "PostgreSQL 13.23 source archive", "label": "13.23", "major": "13", "channel": "historical", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6", "source_url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/13/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 13 English manual", "sha256": "89a2c264cfc945ce4315cba2d564adc0d631254c4264a08fbe3b0c771188e581", "language": "en", "original_url": "/docs/13/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "line": 117, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:117", "sha256": "137949e716bf0db47fce833b808995555f10825302846c2b9caaab1b9e9e6399", "archive_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, {"url": "https://pg.center/docs/13/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 13 English manual", "sha256": "a9a536d274ad7fb994ae70df068b06da58b5077aca4ce86289ed07921baefd4f", "language": "en", "original_url": "/docs/13/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "fb3b349901303ec4122998461121ffd96ea5238d552971d97478d25476d844ed", "archive_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tAssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit);\n\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->commit_cb = pgoutput_commit_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">52.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">52.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u53ea\u652f\u6301\u7248\u672c <code class=\"literal\">1</code>\u3002\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7684\u7248\u672c\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">52.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/13/protocol-logicalrep-message-formats.html\" title=\"52.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a052.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">52.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u9010\u4e2a\u53d1\u9001\u4e8b\u52a1\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u548c Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/13/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "e5a7e9a754701cc575382602ce64764ba95911667314d993629d378a61e81359", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/13/facts/0/label": "Interface family", "/versions/13/facts/0/value": "Logical-decoding output plugin", "/versions/13/facts/1/label": "Handler or routine", "/versions/13/facts/2/label": "Recorded callbacks", "/versions/13/tables/0/title": "Registered interface handlers", "/versions/13/tables/1/title": "Documented options", "/versions/13/tables/2/title": "Option names recognized by this plugin build", "/versions/13/related/0/label": "Logical decoding output interface", "/versions/13/related/1/label": "Existing extension catalogue identity", "/versions/13/related/2/label": "Logical Begin message", "/versions/13/related/3/label": "Logical Relation message", "/versions/13/related/4/label": "Logical tuple representation", "/versions/13/sections/0/title": "Interface and capability boundaries", "/versions/13/sections/1/title": "Output and protocol boundaries", "/versions/13/sections/2/title": "Registered implementation in core source", "/versions/13/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/13/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/4/state": "No handler registered in this build", "/versions/13/tables/0/rows/5/state": "No handler registered in this build", "/versions/13/tables/0/rows/6/state": "No handler registered in this build", "/versions/13/tables/0/rows/7/state": "No handler registered in this build", "/versions/13/tables/0/rows/8/state": "No handler registered in this build", "/versions/13/tables/0/rows/9/state": "No handler registered in this build", "/versions/13/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/13/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/13/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/13/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/13/tables/0/rows/0/feature": "Begin transaction", "/versions/13/tables/0/rows/1/feature": "Row changes", "/versions/13/tables/0/rows/4/feature": "Logical messages", "/versions/13/tables/0/rows/5/feature": "Start streamed transaction", "/versions/13/tables/0/rows/6/feature": "Stream row changes", "/versions/13/tables/0/rows/7/feature": "Prepare transaction", "/versions/13/tables/0/rows/8/feature": "Commit prepared", "/versions/13/tables/0/rows/9/feature": "Rollback prepared", "/versions/13/tables/0/columns/0/label": "Interface operation", "/versions/13/tables/0/columns/1/label": "Source observation", "/versions/13/tables/0/columns/2/label": "Callback", "/versions/13/tables/0/columns/3/label": "Implementation", "/versions/13/tables/1/columns/0/label": "Option", "/versions/13/tables/1/columns/1/label": "Same-version definition", "/versions/13/tables/2/columns/0/label": "Source option name", "/versions/13/tables/1/rows/0/definition": "Protocol version. Currently only version 1 is supported. A valid version is required.", "/versions/13/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/13/tables/0/rows/4/implementation": "Not registered", "/versions/13/tables/0/rows/5/implementation": "Not registered", "/versions/13/tables/0/rows/6/implementation": "Not registered", "/versions/13/tables/0/rows/7/implementation": "Not registered", "/versions/13/tables/0/rows/8/implementation": "Not registered", "/versions/13/tables/0/rows/9/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "945c8af0199d8f45887032b35c2174a6504eca6d1588820ab51616f539b67b91"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently only version 1 is supported. A valid version is required."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "source_options": ["proto_version", "publication_names"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1"}}, "comparison_hash": "e720ae3ea46eba4407a3ce10d76e43106f01751c003969f51e58093113752821", "manual_language": "zh", "runtime_verified": false}, "14": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "15"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "\u672a\u767b\u8bb0"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u5f53\u524d\u652f\u6301\u7248\u672c 1 \u548c 2 \u3002\u9700\u8981\u4e00\u4e2a\u5408\u6cd5\u7684\u7248\u672c\u53f7\u3002\u7248\u672c 2 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u5b83\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "binary", "definition": "\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002"}, {"name": "messages", "definition": "\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002"}, {"name": "streaming", "definition": "\u4e00\u4e2a\u5e03\u5c14\u9009\u9879\uff0c\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\u3002\u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2 \u624d\u80fd\u542f\u7528\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "binary"}, {"name": "messages"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/14/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=14", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=14", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=14", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=14", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}], "release": {"ref": "PostgreSQL 14.24 source archive", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897", "source_url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/14/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 14 English manual", "sha256": "ad5619c17b32069e563861948a6dfe2f55ec9bea3e99f2400e8b57afd6927f26", "language": "en", "original_url": "/docs/14/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "line": 149, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:149", "sha256": "f906f70fba365cb8d83cdc6819ea45e61a58973a1cbae4011fa2bafbdcf3bd23", "archive_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, {"url": "https://pg.center/docs/14/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 14 English manual", "sha256": "8657a205ee5dc4698b76016d8df9f89a0aea844bdeaa5466b2308401ad6b6dc4", "language": "en", "original_url": "/docs/14/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "fae79c22efb1fecb13ad7635bb64eb1c2bf54ad456fa230905d2ef0bab88ea25", "archive_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tAssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit);\n\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">53.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">53.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u534f\u8bae\u7248\u672c\u3002\u5f53\u524d\u652f\u6301\u7248\u672c <code class=\"literal\">1</code> \u548c <code class=\"literal\">2</code>\u3002\u9700\u8981\u4e00\u4e2a\u5408\u6cd5\u7684\u7248\u672c\u53f7\u3002\u7248\u672c <code class=\"literal\">2</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u5b83\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">binary</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">messages</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 <code class=\"function\">pg_logical_emit_message</code> \u5199\u5165\u7684\u6d88\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">streaming</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e00\u4e2a\u5e03\u5c14\u9009\u9879\uff0c\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\u3002\u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2 \u624d\u80fd\u542f\u7528\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">53.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/14/protocol-logicalrep-message-formats.html\" title=\"53.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a053.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">53.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u9010\u4e2a\u53d1\u9001\u4e8b\u52a1\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u548c Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u4e8b\u52a1\u3002\u5bf9\u4e8e\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u548c Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u53d8\u66f4\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/14/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "8f96bce3abd5d88963c4f809b6bbe6cd2257c2b69d96fe92ddeb4298ec521193", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[5]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[7]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[9]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/14/facts/0/label": "Interface family", "/versions/14/facts/0/value": "Logical-decoding output plugin", "/versions/14/facts/1/label": "Handler or routine", "/versions/14/facts/2/label": "Recorded callbacks", "/versions/14/tables/0/title": "Registered interface handlers", "/versions/14/tables/1/title": "Documented options", "/versions/14/tables/2/title": "Option names recognized by this plugin build", "/versions/14/related/0/label": "Logical decoding output interface", "/versions/14/related/1/label": "Existing extension catalogue identity", "/versions/14/related/2/label": "Logical Begin message", "/versions/14/related/3/label": "Logical Relation message", "/versions/14/related/4/label": "Logical tuple representation", "/versions/14/related/5/label": "Logical Stream Start message", "/versions/14/sections/0/title": "Interface and capability boundaries", "/versions/14/sections/1/title": "Output and protocol boundaries", "/versions/14/sections/2/title": "Registered implementation in core source", "/versions/14/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/14/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/7/state": "No handler registered in this build", "/versions/14/tables/0/rows/8/state": "No handler registered in this build", "/versions/14/tables/0/rows/9/state": "No handler registered in this build", "/versions/14/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/14/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/14/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/14/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/14/tables/0/rows/0/feature": "Begin transaction", "/versions/14/tables/0/rows/1/feature": "Row changes", "/versions/14/tables/0/rows/4/feature": "Logical messages", "/versions/14/tables/0/rows/5/feature": "Start streamed transaction", "/versions/14/tables/0/rows/6/feature": "Stream row changes", "/versions/14/tables/0/rows/7/feature": "Prepare transaction", "/versions/14/tables/0/rows/8/feature": "Commit prepared", "/versions/14/tables/0/rows/9/feature": "Rollback prepared", "/versions/14/tables/0/columns/0/label": "Interface operation", "/versions/14/tables/0/columns/1/label": "Source observation", "/versions/14/tables/0/columns/2/label": "Callback", "/versions/14/tables/0/columns/3/label": "Implementation", "/versions/14/tables/1/columns/0/label": "Option", "/versions/14/tables/1/columns/1/label": "Same-version definition", "/versions/14/tables/2/columns/0/label": "Source option name", "/versions/14/tables/1/rows/0/definition": "Protocol version. Currently versions 1 and 2 are supported. A valid version is required. The version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions.", "/versions/14/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/14/tables/1/rows/2/definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust.", "/versions/14/tables/1/rows/3/definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message .", "/versions/14/tables/1/rows/4/definition": "Boolean option to enable streaming of in-progress transactions. Minimum protocol version 2 is required to turn it on.", "/versions/14/tables/0/rows/7/implementation": "Not registered", "/versions/14/tables/0/rows/8/implementation": "Not registered", "/versions/14/tables/0/rows/9/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "5e9c71a5e4960b3d18c3daf7d97a3bf6a50541064aefe453cc97e691e07aa3ca"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently versions 1 and 2 are supported. A valid version is required. The version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust."}, {"name": "messages", "definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message ."}, {"name": "streaming", "definition": "Boolean option to enable streaming of in-progress transactions. Minimum protocol version 2 is required to turn it on."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter"}, "source_options": ["binary", "messages", "proto_version", "publication_names", "streaming"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2"}}, "comparison_hash": "fb770dffbee4b87a47f7d20428fcdc6e8a74308fa91944bba5d25080a20d9a1a", "manual_language": "zh", "runtime_verified": false}, "15": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1\u30012 \u548c 3\uff0c\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7248\u672c\u3002\u7248\u672c 2 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u3002\u7248\u672c 3 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "binary", "definition": "\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002"}, {"name": "messages", "definition": "\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002"}, {"name": "streaming", "definition": "\u4e00\u4e2a\u5e03\u5c14\u9009\u9879\uff0c\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\u3002\u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2 \u624d\u80fd\u542f\u7528\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "binary"}, {"name": "messages"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/15/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=15", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=15", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=15", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=15", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=15", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 15.19 source archive", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89", "source_url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/15/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 15 English manual", "sha256": "02bd28990f7ac5c4b3a88806ed90fe6b0d724831599e1326895a3a9ebb33baee", "language": "en", "original_url": "/docs/15/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "line": 259, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:259", "sha256": "b62179c45f89cf9aea945d7b0cbdef6d1998cbf54e908ad4ef42091e7515a67d", "archive_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, {"url": "https://pg.center/docs/15/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 15 English manual", "sha256": "6c81b3b643e0a8f47dc1a136953fb61d57b48434a3c8aa7393b06dae440406a5", "language": "en", "original_url": "/docs/15/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "9b04e25ff58eb3e3cbbfac4766d96c6db78529ae80164164e3d1158973d83442", "archive_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tAssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit);\n\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">55.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">55.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7684\u7248\u672c\u6709 <code class=\"literal\">1</code>\u3001<code class=\"literal\">2</code> \u548c <code class=\"literal\">3</code>\u3002\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7248\u672c\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">2</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u6b63\u5728\u8fdb\u884c\u7684\u5927\u578b\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">3</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</dd>\n<dt><span class=\"term\">binary</span></dt>\n<dd>\n<p lang=\"zh\">\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002</p>\n</dd>\n<dt><span class=\"term\">messages</span></dt>\n<dd>\n<p lang=\"zh\">\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 <code class=\"function\">pg_logical_emit_message</code> \u5199\u5165\u7684\u6d88\u606f\u3002</p>\n</dd>\n<dt><span class=\"term\">streaming</span></dt>\n<dd>\n<p lang=\"zh\">\u4e00\u4e2a\u5e03\u5c14\u9009\u9879\uff0c\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\u3002\u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2 \u624d\u80fd\u542f\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\">two_phase</span></dt>\n<dd>\n<p lang=\"zh\">\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">55.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/15/protocol-logicalrep-message-formats.html\" title=\"55.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a055.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">55.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/15/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "174048b2a5e6f7d125cd073b6b31b70db7353f3ca45c297ea26dba36605dc355", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[0]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[1]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[2]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[3]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[4]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[5]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[6]", "#PROTOCOL-LOGICAL-REPLICATION-PARAMS/p[7]", "#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/15/facts/0/label": "Interface family", "/versions/15/facts/0/value": "Logical-decoding output plugin", "/versions/15/facts/1/label": "Handler or routine", "/versions/15/facts/2/label": "Recorded callbacks", "/versions/15/tables/0/title": "Registered interface handlers", "/versions/15/tables/1/title": "Documented options", "/versions/15/tables/2/title": "Option names recognized by this plugin build", "/versions/15/related/0/label": "Logical decoding output interface", "/versions/15/related/1/label": "Existing extension catalogue identity", "/versions/15/related/2/label": "Logical Begin message", "/versions/15/related/3/label": "Logical Relation message", "/versions/15/related/4/label": "Logical tuple representation", "/versions/15/related/5/label": "Logical Stream Start message", "/versions/15/related/6/label": "Logical Prepare message", "/versions/15/sections/0/title": "Interface and capability boundaries", "/versions/15/sections/1/title": "Output and protocol boundaries", "/versions/15/sections/2/title": "Registered implementation in core source", "/versions/15/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/15/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/15/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/15/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/15/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/15/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/15/tables/0/rows/0/feature": "Begin transaction", "/versions/15/tables/0/rows/1/feature": "Row changes", "/versions/15/tables/0/rows/4/feature": "Logical messages", "/versions/15/tables/0/rows/5/feature": "Start streamed transaction", "/versions/15/tables/0/rows/6/feature": "Stream row changes", "/versions/15/tables/0/rows/7/feature": "Prepare transaction", "/versions/15/tables/0/rows/8/feature": "Commit prepared", "/versions/15/tables/0/rows/9/feature": "Rollback prepared", "/versions/15/tables/0/columns/0/label": "Interface operation", "/versions/15/tables/0/columns/1/label": "Source observation", "/versions/15/tables/0/columns/2/label": "Callback", "/versions/15/tables/0/columns/3/label": "Implementation", "/versions/15/tables/1/columns/0/label": "Option", "/versions/15/tables/1/columns/1/label": "Same-version definition", "/versions/15/tables/2/columns/0/label": "Source option name", "/versions/15/tables/1/rows/0/definition": "Protocol version. Currently versions 1 , 2 , and 3 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits.", "/versions/15/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/15/tables/1/rows/2/definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust.", "/versions/15/tables/1/rows/3/definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message .", "/versions/15/tables/1/rows/4/definition": "Boolean option to enable streaming of in-progress transactions. Minimum protocol version 2 is required to turn it on.", "/versions/15/tables/1/rows/5/definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "16467f48d467339480a88b1215d3b80730b73c5926a537b6bf9d20f92264141b"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently versions 1 , 2 , and 3 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust."}, {"name": "messages", "definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message ."}, {"name": "streaming", "definition": "Boolean option to enable streaming of in-progress transactions. Minimum protocol version 2 is required to turn it on."}, {"name": "two_phase", "definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3"}}, "comparison_hash": "9ff9b317d99bdc01268d07f723dd427172fb3d7e326a4d6eb063af749c003085", "manual_language": "zh", "runtime_verified": false}, "16": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}, {"label": "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM", "value": "4"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1\u30012\u30013 \u548c 4\uff0c\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7248\u672c\u3002\u7248\u672c 2 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u3002\u7248\u672c 3 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002\u7248\u672c 4 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "\u4e8c\u8fdb\u5236", "definition": "\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002"}, {"name": "messages", "definition": "\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002"}, {"name": "streaming", "definition": "\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a off \uff08\u9ed8\u8ba4\uff09\u3001 on \u548c parallel \u3002 parallel \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a on \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a parallel \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002"}, {"name": "origin", "definition": "\u6309\u6765\u6e90\u9009\u62e9\u8981\u53d1\u9001\u7684\u53d8\u66f4\u3002\u53ef\u9009\u503c\u4e3a \"none\"\uff0c\u4ec5\u53d1\u9001\u672a\u5173\u8054\u6765\u6e90\u7684\u53d8\u66f4\uff1b\u6216 \"any\"\uff0c\u65e0\u8bba\u6765\u6e90\u5982\u4f55\u90fd\u53d1\u9001\u3002\u6b64\u9009\u9879\u53ef\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff0c\u5373\u65e0\u9650\u91cd\u590d\u590d\u5236\u540c\u4e00\u6570\u636e\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "\u4e8c\u8fdb\u5236"}, {"name": "messages"}, {"name": "origin"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/16/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=16", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=16", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=16", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=16", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=16", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 16.15 source archive", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed", "source_url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/16/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 16 English manual", "sha256": "49bf957dc34e5cd53a4766e0283d0aef5223273d1f72e168c7d8b03e557d69a7", "language": "en", "original_url": "/docs/16/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "line": 258, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:258", "sha256": "74dd79304594a7a5b5a8ddb9e567394352706f186ec2a8bddc652a64be712672", "archive_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, {"url": "https://pg.center/docs/16/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 16 English manual", "sha256": "c093330981ad988f2081ad6ac1eb74b0c8ab7fbc19928ca50e12fcdfe7647a4f", "language": "en", "original_url": "/docs/16/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "dfecefee411c6448fd9f366d4f2a458dbb4bd95616306a1b214457302a7b46ed", "archive_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">55.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">55.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7684\u7248\u672c\u6709 <code class=\"literal\">1</code>\u3001<code class=\"literal\">2</code>\u3001<code class=\"literal\">3</code> \u548c <code class=\"literal\">4</code>\u3002\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7248\u672c\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">2</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u6b63\u5728\u8fdb\u884c\u7684\u5927\u578b\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">3</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">4</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt lang=\"zh\"><em>\u4e8c\u8fdb\u5236</em></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">messages</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 <code class=\"function\">pg_logical_emit_message</code> \u5199\u5165\u7684\u6d88\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">streaming</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">off</code>\uff08\u9ed8\u8ba4\uff09\u3001<code class=\"literal\">on</code> \u548c <code class=\"literal\">parallel</code>\u3002<code class=\"literal\">parallel</code> \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a <code class=\"literal\">on</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a <code class=\"literal\">parallel</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">two_phase</span></dt>\n<dd>\n<p lang=\"zh\">\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002</p>\n</dd>\n<dt><span class=\"term\">origin</span></dt>\n<dd>\n<p lang=\"zh\">\u6309\u6765\u6e90\u9009\u62e9\u8981\u53d1\u9001\u7684\u53d8\u66f4\u3002\u53ef\u9009\u503c\u4e3a \"none\"\uff0c\u4ec5\u53d1\u9001\u672a\u5173\u8054\u6765\u6e90\u7684\u53d8\u66f4\uff1b\u6216 \"any\"\uff0c\u65e0\u8bba\u6765\u6e90\u5982\u4f55\u90fd\u53d1\u9001\u3002\u6b64\u9009\u9879\u53ef\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff0c\u5373\u65e0\u9650\u91cd\u590d\u590d\u5236\u540c\u4e00\u6570\u636e\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">55.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/16/protocol-logicalrep-message-formats.html\" title=\"55.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a055.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">55.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/16/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/datatype-numeric.html", "method": "same-major semantic node", "sha256": "87df4710673a5ff21d0f9b3bd1992049f6690db259787f9beafa856007d8c210", "language": "zh", "matched_nodes": ["#DATATYPE-NUMERIC/div[9]/p[21]/span[4]"]}, {"url": "/docs/16/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "47817f8c3c5adbf8121a06fd2a2df9858e292469b8b8ce34a098182418851295", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[5]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[7]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[9]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/16/facts/0/label": "Interface family", "/versions/16/facts/0/value": "Logical-decoding output plugin", "/versions/16/facts/1/label": "Handler or routine", "/versions/16/facts/2/label": "Recorded callbacks", "/versions/16/tables/0/title": "Registered interface handlers", "/versions/16/tables/1/title": "Documented options", "/versions/16/tables/2/title": "Option names recognized by this plugin build", "/versions/16/related/0/label": "Logical decoding output interface", "/versions/16/related/1/label": "Existing extension catalogue identity", "/versions/16/related/2/label": "Logical Begin message", "/versions/16/related/3/label": "Logical Relation message", "/versions/16/related/4/label": "Logical tuple representation", "/versions/16/related/5/label": "Logical Stream Start message", "/versions/16/related/6/label": "Logical Prepare message", "/versions/16/sections/0/title": "Interface and capability boundaries", "/versions/16/sections/1/title": "Output and protocol boundaries", "/versions/16/sections/2/title": "Registered implementation in core source", "/versions/16/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/16/tables/1/rows/2/name": "binary", "/versions/16/tables/2/rows/0/name": "binary", "/versions/16/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/16/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/16/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/16/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/16/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/16/tables/0/rows/0/feature": "Begin transaction", "/versions/16/tables/0/rows/1/feature": "Row changes", "/versions/16/tables/0/rows/4/feature": "Logical messages", "/versions/16/tables/0/rows/5/feature": "Start streamed transaction", "/versions/16/tables/0/rows/6/feature": "Stream row changes", "/versions/16/tables/0/rows/7/feature": "Prepare transaction", "/versions/16/tables/0/rows/8/feature": "Commit prepared", "/versions/16/tables/0/rows/9/feature": "Rollback prepared", "/versions/16/tables/0/columns/0/label": "Interface operation", "/versions/16/tables/0/columns/1/label": "Source observation", "/versions/16/tables/0/columns/2/label": "Callback", "/versions/16/tables/0/columns/3/label": "Implementation", "/versions/16/tables/1/columns/0/label": "Option", "/versions/16/tables/1/columns/1/label": "Same-version definition", "/versions/16/tables/2/columns/0/label": "Source option name", "/versions/16/tables/1/rows/0/definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel.", "/versions/16/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/16/tables/1/rows/2/definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust.", "/versions/16/tables/1/rows/3/definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message .", "/versions/16/tables/1/rows/4/definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value.", "/versions/16/tables/1/rows/5/definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on.", "/versions/16/tables/1/rows/6/definition": "Option to send changes by their origin. Possible values are \"none\" to only send the changes that have no origin associated, or \"any\" to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "20addf50983c3a06344dec1449fc3eb9575ac1821b53b107b7ffe271337c162e"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust."}, {"name": "messages", "definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message ."}, {"name": "streaming", "definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value."}, {"name": "two_phase", "definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on."}, {"name": "origin", "definition": "Option to send changes by their origin. Possible values are \"none\" to only send the changes that have no origin associated, or \"any\" to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "origin", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3", "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM": "4"}}, "comparison_hash": "caca53c5d8da82cd5b929b0a2d57664baf3fe51f1d73bbfb2de9184b7a206d84", "manual_language": "zh", "runtime_verified": false}, "17": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}, {"label": "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM", "value": "4"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1\u30012\u30013 \u548c 4\uff0c\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7248\u672c\u3002\u7248\u672c 2 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u3002\u7248\u672c 3 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002\u7248\u672c 4 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "\u4e8c\u8fdb\u5236", "definition": "\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002"}, {"name": "messages", "definition": "\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002"}, {"name": "streaming", "definition": "\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a off \uff08\u9ed8\u8ba4\uff09\u3001 on \u548c parallel \u3002 parallel \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a on \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a parallel \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002"}, {"name": "origin", "definition": "\u6309\u6765\u6e90\u9009\u62e9\u8981\u53d1\u9001\u7684\u53d8\u66f4\u3002\u53ef\u9009\u503c\u4e3a \"none\"\uff0c\u4ec5\u53d1\u9001\u672a\u5173\u8054\u6765\u6e90\u7684\u53d8\u66f4\uff1b\u6216 \"any\"\uff0c\u65e0\u8bba\u6765\u6e90\u5982\u4f55\u90fd\u53d1\u9001\u3002\u6b64\u9009\u9879\u53ef\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff0c\u5373\u65e0\u9650\u91cd\u590d\u590d\u5236\u540c\u4e00\u6570\u636e\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "\u4e8c\u8fdb\u5236"}, {"name": "messages"}, {"name": "origin"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/17/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=17", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=17", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=17", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=17", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=17", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 17.11 source archive", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979", "source_url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/17/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 17 English manual", "sha256": "d067f4d47c559b2f60eb144af3fb642907b256b2f4f48c971fba3cb7169e5533", "language": "en", "original_url": "/docs/17/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "line": 256, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:256", "sha256": "44ff6063db730a29b8acfa13d1eccc2454f2b48f380ed4dfeb18391451810504", "archive_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, {"url": "https://pg.center/docs/17/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 17 English manual", "sha256": "2be04efbf0e2c4266665b8e7b8ebbc04a92456d3fcfdfe2667e8e4486bd70be8", "language": "en", "original_url": "/docs/17/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "50a3f4aaf9976c7206fa89a15abc53cf36d03919a07ed5a255c8b9738e1ecc48", "archive_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">53.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">53.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7684\u7248\u672c\u6709 <code class=\"literal\">1</code>\u3001<code class=\"literal\">2</code>\u3001<code class=\"literal\">3</code> \u548c <code class=\"literal\">4</code>\u3002\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7248\u672c\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">2</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u6b63\u5728\u8fdb\u884c\u7684\u5927\u578b\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">3</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">4</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt lang=\"zh\"><em>\u4e8c\u8fdb\u5236</em></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">messages</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 <code class=\"function\">pg_logical_emit_message</code> \u5199\u5165\u7684\u6d88\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">streaming</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">off</code>\uff08\u9ed8\u8ba4\uff09\u3001<code class=\"literal\">on</code> \u548c <code class=\"literal\">parallel</code>\u3002<code class=\"literal\">parallel</code> \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a <code class=\"literal\">on</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a <code class=\"literal\">parallel</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">two_phase</span></dt>\n<dd>\n<p lang=\"zh\">\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002</p>\n</dd>\n<dt><span class=\"term\">origin</span></dt>\n<dd>\n<p lang=\"zh\">\u6309\u6765\u6e90\u9009\u62e9\u8981\u53d1\u9001\u7684\u53d8\u66f4\u3002\u53ef\u9009\u503c\u4e3a \"none\"\uff0c\u4ec5\u53d1\u9001\u672a\u5173\u8054\u6765\u6e90\u7684\u53d8\u66f4\uff1b\u6216 \"any\"\uff0c\u65e0\u8bba\u6765\u6e90\u5982\u4f55\u90fd\u53d1\u9001\u3002\u6b64\u9009\u9879\u53ef\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff0c\u5373\u65e0\u9650\u91cd\u590d\u590d\u5236\u540c\u4e00\u6570\u636e\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">53.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/17/protocol-logicalrep-message-formats.html\" title=\"53.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a053.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">53.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/17/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/datatype-numeric.html", "method": "same-major semantic node", "sha256": "ebe132545435b9b9fb14136c2626384e943564606831d8df4f63b1cda60e7a58", "language": "zh", "matched_nodes": ["#DATATYPE-NUMERIC/div[9]/p[21]/span[4]"]}, {"url": "/docs/17/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "c695b4c09ab909e7e6ffa63ae575b6ed77856bfed8268dd12e24f61016a0fc9e", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[5]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[7]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[9]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/17/facts/0/label": "Interface family", "/versions/17/facts/0/value": "Logical-decoding output plugin", "/versions/17/facts/1/label": "Handler or routine", "/versions/17/facts/2/label": "Recorded callbacks", "/versions/17/tables/0/title": "Registered interface handlers", "/versions/17/tables/1/title": "Documented options", "/versions/17/tables/2/title": "Option names recognized by this plugin build", "/versions/17/related/0/label": "Logical decoding output interface", "/versions/17/related/1/label": "Existing extension catalogue identity", "/versions/17/related/2/label": "Logical Begin message", "/versions/17/related/3/label": "Logical Relation message", "/versions/17/related/4/label": "Logical tuple representation", "/versions/17/related/5/label": "Logical Stream Start message", "/versions/17/related/6/label": "Logical Prepare message", "/versions/17/sections/0/title": "Interface and capability boundaries", "/versions/17/sections/1/title": "Output and protocol boundaries", "/versions/17/sections/2/title": "Registered implementation in core source", "/versions/17/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/17/tables/1/rows/2/name": "binary", "/versions/17/tables/2/rows/0/name": "binary", "/versions/17/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/17/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/17/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/17/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/17/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/17/tables/0/rows/0/feature": "Begin transaction", "/versions/17/tables/0/rows/1/feature": "Row changes", "/versions/17/tables/0/rows/4/feature": "Logical messages", "/versions/17/tables/0/rows/5/feature": "Start streamed transaction", "/versions/17/tables/0/rows/6/feature": "Stream row changes", "/versions/17/tables/0/rows/7/feature": "Prepare transaction", "/versions/17/tables/0/rows/8/feature": "Commit prepared", "/versions/17/tables/0/rows/9/feature": "Rollback prepared", "/versions/17/tables/0/columns/0/label": "Interface operation", "/versions/17/tables/0/columns/1/label": "Source observation", "/versions/17/tables/0/columns/2/label": "Callback", "/versions/17/tables/0/columns/3/label": "Implementation", "/versions/17/tables/1/columns/0/label": "Option", "/versions/17/tables/1/columns/1/label": "Same-version definition", "/versions/17/tables/2/columns/0/label": "Source option name", "/versions/17/tables/1/rows/0/definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel.", "/versions/17/tables/1/rows/1/definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/17/tables/1/rows/2/definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust.", "/versions/17/tables/1/rows/3/definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message .", "/versions/17/tables/1/rows/4/definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value.", "/versions/17/tables/1/rows/5/definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on.", "/versions/17/tables/1/rows/6/definition": "Option to send changes by their origin. Possible values are \"none\" to only send the changes that have no origin associated, or \"any\" to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "e6c56d5321716b26858a65148f030eb3cdff99022695eb38c1f82d592dc2160c"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel."}, {"name": "publication_names", "definition": "Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust."}, {"name": "messages", "definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message ."}, {"name": "streaming", "definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value."}, {"name": "two_phase", "definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on."}, {"name": "origin", "definition": "Option to send changes by their origin. Possible values are \"none\" to only send the changes that have no origin associated, or \"any\" to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "origin", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3", "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM": "4"}}, "comparison_hash": "caca53c5d8da82cd5b929b0a2d57664baf3fe51f1d73bbfb2de9184b7a206d84", "manual_language": "zh", "runtime_verified": false}, "18": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}, {"label": "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM", "value": "4"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1\u30012\u30013 \u548c 4\uff0c\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7248\u672c\u3002\u7248\u672c 2 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u3002\u7248\u672c 3 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002\u7248\u672c 4 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "\u4e8c\u8fdb\u5236", "definition": "\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002"}, {"name": "messages", "definition": "\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002"}, {"name": "streaming", "definition": "\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a off \uff08\u9ed8\u8ba4\uff09\u3001 on \u548c parallel \u3002 parallel \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a on \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a parallel \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002"}, {"name": "origin", "definition": "\u6309\u6765\u6e90\u53d1\u9001\u53d8\u66f4\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a none \uff08\u4ec5\u53d1\u9001\u65e0\u6765\u6e90\u4fe1\u606f\u7684\u53d8\u66f4\uff09\u6216 any \uff08\u65e0\u8bba\u6765\u6e90\u5747\u53d1\u9001\uff09\u3002\u8be5\u9009\u9879\u53ef\u7528\u4e8e\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff08\u540c\u4e00\u6570\u636e\u65e0\u9650\u590d\u5236\uff09\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "\u4e8c\u8fdb\u5236"}, {"name": "messages"}, {"name": "origin"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/18/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=18", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=18", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=18", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=18", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=18", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 18.6 source archive", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/18/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 18 English manual", "sha256": "db5675868e641807e48ae6e19f51ed2a9bc9a29bd1b7a365c16eb3cae022a18e", "language": "en", "original_url": "/docs/18/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "line": 262, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:262", "sha256": "0a16f2abc3218286200f1a0a9c1d67fb7115ec0145b5edd7e4bd66ecb4d07566", "archive_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, {"url": "https://pg.center/docs/18/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 18 English manual", "sha256": "e5b3d13adfcc9e33f24524cb09d93eb91a1292fdb3124234002ccccf93f45738", "language": "en", "original_url": "/docs/18/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "1c6101fa446aabe8d78a722fe62c4fce647f5b492ab4d7b460907ce73e035180", "archive_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">54.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">54.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7684\u7248\u672c\u6709 <code class=\"literal\">1</code>\u3001<code class=\"literal\">2</code>\u3001<code class=\"literal\">3</code> \u548c <code class=\"literal\">4</code>\u3002\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7248\u672c\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">2</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u6b63\u5728\u8fdb\u884c\u7684\u5927\u578b\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">3</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">4</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt lang=\"zh\"><em>\u4e8c\u8fdb\u5236</em></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">messages</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 <code class=\"function\">pg_logical_emit_message</code> \u5199\u5165\u7684\u6d88\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">streaming</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">off</code>\uff08\u9ed8\u8ba4\uff09\u3001<code class=\"literal\">on</code> \u548c <code class=\"literal\">parallel</code>\u3002<code class=\"literal\">parallel</code> \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a <code class=\"literal\">on</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a <code class=\"literal\">parallel</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">two_phase</span></dt>\n<dd>\n<p lang=\"zh\">\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002</p>\n</dd>\n<dt><span class=\"term\">origin</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6309\u6765\u6e90\u53d1\u9001\u53d8\u66f4\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">none</code>\uff08\u4ec5\u53d1\u9001\u65e0\u6765\u6e90\u4fe1\u606f\u7684\u53d8\u66f4\uff09\u6216 <code class=\"literal\">any</code>\uff08\u65e0\u8bba\u6765\u6e90\u5747\u53d1\u9001\uff09\u3002\u8be5\u9009\u9879\u53ef\u7528\u4e8e\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff08\u540c\u4e00\u6570\u636e\u65e0\u9650\u590d\u5236\uff09\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">54.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/18/protocol-logicalrep-message-formats.html\" title=\"54.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a054.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">54.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/18/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/datatype-numeric.html", "method": "same-major semantic node", "sha256": "3119f68768634c1b35c2d9fb65ecb989addbdf99d88064c8292f114cf3b2b79d", "language": "zh", "matched_nodes": ["#DATATYPE-NUMERIC/div[9]/p[21]/span[4]"]}, {"url": "/docs/18/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "2385ad8545298692f3b529efec690d261b9f6e3f751a471aec37549ef8596fc7", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[13]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[5]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[7]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[9]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/18/facts/0/label": "Interface family", "/versions/18/facts/0/value": "Logical-decoding output plugin", "/versions/18/facts/1/label": "Handler or routine", "/versions/18/facts/2/label": "Recorded callbacks", "/versions/18/tables/0/title": "Registered interface handlers", "/versions/18/tables/1/title": "Documented options", "/versions/18/tables/2/title": "Option names recognized by this plugin build", "/versions/18/related/0/label": "Logical decoding output interface", "/versions/18/related/1/label": "Existing extension catalogue identity", "/versions/18/related/2/label": "Logical Begin message", "/versions/18/related/3/label": "Logical Relation message", "/versions/18/related/4/label": "Logical tuple representation", "/versions/18/related/5/label": "Logical Stream Start message", "/versions/18/related/6/label": "Logical Prepare message", "/versions/18/sections/0/title": "Interface and capability boundaries", "/versions/18/sections/1/title": "Output and protocol boundaries", "/versions/18/sections/2/title": "Registered implementation in core source", "/versions/18/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/18/tables/1/rows/2/name": "binary", "/versions/18/tables/2/rows/0/name": "binary", "/versions/18/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/18/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/18/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/18/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/18/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/18/tables/0/rows/0/feature": "Begin transaction", "/versions/18/tables/0/rows/1/feature": "Row changes", "/versions/18/tables/0/rows/4/feature": "Logical messages", "/versions/18/tables/0/rows/5/feature": "Start streamed transaction", "/versions/18/tables/0/rows/6/feature": "Stream row changes", "/versions/18/tables/0/rows/7/feature": "Prepare transaction", "/versions/18/tables/0/rows/8/feature": "Commit prepared", "/versions/18/tables/0/rows/9/feature": "Rollback prepared", "/versions/18/tables/0/columns/0/label": "Interface operation", "/versions/18/tables/0/columns/1/label": "Source observation", "/versions/18/tables/0/columns/2/label": "Callback", "/versions/18/tables/0/columns/3/label": "Implementation", "/versions/18/tables/1/columns/0/label": "Option", "/versions/18/tables/1/columns/1/label": "Same-version definition", "/versions/18/tables/2/columns/0/label": "Source option name", "/versions/18/tables/1/rows/0/definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel.", "/versions/18/tables/1/rows/1/definition": "Comma-separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/18/tables/1/rows/2/definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust.", "/versions/18/tables/1/rows/3/definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message .", "/versions/18/tables/1/rows/4/definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value.", "/versions/18/tables/1/rows/5/definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on.", "/versions/18/tables/1/rows/6/definition": "Option to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "3884cfe044aa0be407a5f4d36f2f4041ad9dccc7c46ed1edc6e96374c7e8aec0"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel."}, {"name": "publication_names", "definition": "Comma-separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust."}, {"name": "messages", "definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message ."}, {"name": "streaming", "definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value."}, {"name": "two_phase", "definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on."}, {"name": "origin", "definition": "Option to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "origin", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3", "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM": "4"}}, "comparison_hash": "825d73cfabb72ac9c0d2de837bc79ea972bb82f3c010a3833852f3f7e9e3935a", "manual_language": "zh", "runtime_verified": false}, "19": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}, {"label": "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM", "value": "4"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u6307\u5b9a\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1 \u3001 2 \u3001 3 \u548c 4 \u3002\u5fc5\u987b\u63d0\u4f9b\u6709\u6548\u7684\u7248\u672c\u3002 \u7248\u672c 2 \u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff1b\u5f53 streaming \u8bbe\u7f6e\u4e3a on \u4ee5\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u7248\u672c\u3002 \u7248\u672c 3 \u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff1b\u5f53\u542f\u7528 two_phase \u4ee5\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u7248\u672c\u3002 \u7248\u672c 4 \u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff1b\u5f53 streaming \u8bbe\u7f6e\u4e3a parallel \u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u4ee5\u4f9b\u5e76\u884c\u5e94\u7528\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u7248\u672c\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "\u4e8c\u8fdb\u5236", "definition": "\u542f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002\u9ed8\u8ba4\u503c\u4e3a off \u3002"}, {"name": "messages", "definition": "\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002\u9ed8\u8ba4\u503c\u4e3a off \u3002"}, {"name": "streaming", "definition": "\u542f\u7528\u5bf9\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\u3002\u6709\u6548\u503c\u4e3a off \uff08\u9ed8\u8ba4\uff09\u3001 on \u548c parallel \u3002 \u5f53\u8bbe\u7f6e\u4e3a off \u65f6\uff0c pgoutput \u4f1a\u5148\u5b8c\u6574\u89e3\u7801\u4e00\u4e2a\u4e8b\u52a1\uff0c\u518d\u5c06\u5176\u6574\u4f53\u53d1\u9001\u3002\u8be5\u6a21\u5f0f\u9002\u7528\u4e8e\u4efb\u4f55\u534f\u8bae\u7248\u672c\u3002 \u5f53\u8bbe\u7f6e\u4e3a on \u65f6\uff0c pgoutput \u4f1a\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u3002\u8fd9\u8981\u6c42\u534f\u8bae\u7248\u672c\u4e3a 2 \u6216\u66f4\u9ad8\u3002 \u5f53\u8bbe\u7f6e\u4e3a parallel \u65f6\uff0c pgoutput \u4f1a\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5e76\u5728\u67d0\u4e9b\u6d88\u606f\u4e2d\u989d\u5916\u53d1\u9001\u4fe1\u606f\uff0c\u4ee5\u652f\u6301\u5e76\u884c\u5904\u7406\u3002\u8fd9\u8981\u6c42\u534f\u8bae\u7248\u672c\u4e3a 4 \u6216\u66f4\u9ad8\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u53d1\u9001\u4e24\u9636\u6bb5\u4e8b\u52a1\u3002\u5f00\u542f\u8be5\u9009\u9879\u81f3\u5c11\u9700\u8981\u534f\u8bae\u7248\u672c 3\u3002\u9ed8\u8ba4\u503c\u4e3a off \u3002"}, {"name": "origin", "definition": "\u6307\u5b9a\u662f\u5426\u6309\u6765\u6e90\u53d1\u9001\u66f4\u6539\u3002\u53ef\u9009\u503c\u5305\u62ec none \uff0c\u4ec5\u53d1\u9001\u6ca1\u6709\u5173\u8054\u6765\u6e90\u7684\u66f4\u6539\uff1b\u4ee5\u53ca any \uff0c\u4e0d\u8bba\u5176\u6765\u6e90\u4e3a\u4f55\u90fd\u53d1\u9001\u66f4\u6539\u3002\u8fd9\u53ef\u7528\u4e8e\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u51fa\u73b0\u73af\u8def\uff08\u540c\u4e00\u6570\u636e\u7684\u65e0\u9650\u590d\u5236\uff09\u3002\u9ed8\u8ba4\u503c\u4e3a any \u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "\u4e8c\u8fdb\u5236"}, {"name": "messages"}, {"name": "origin"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/19/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=19", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=19", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=19", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=19", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=19", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 19beta4 source archive", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86", "source_url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/19/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 19 English manual", "sha256": "f3c99200f43017c768cf77229e3a02314f4fdf9ba45231f26404494395d571da", "language": "en", "original_url": "/docs/19/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "line": 262, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:262", "sha256": "ae741b78ad21877b8fad6c1f9025fe46db22fea115b80fb62f423ae45c063ad5", "archive_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, {"url": "https://pg.center/docs/19/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 19 English manual", "sha256": "5bbd383a295ed5cdb65b99d721fb7320aafdb7a343b26abbcb022134635d5ff7", "language": "en", "original_url": "/docs/19/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "c382263abcd29845c0b06ea2152cdcea357993fe806bf8bf9c1cb00a0b7678dc", "archive_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">54.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">54.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\u53ef\u4ee5\u5411\u6307\u5b9a\u590d\u5236\u69fd\u5173\u8054\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u4f20\u9012\u9009\u9879\u3002\u6807\u51c6\uff08<code class=\"literal\">pgoutput</code>\uff09\u63d2\u4ef6\u63a5\u53d7\u7684\u9009\u9879\u89c1<a class=\"xref\" href=\"/docs/19/logicaldecoding-output-plugin.html#LOGICALDECODING-PGOUTPUT-OPTIONS\" title=\"47.6.1.1.\u00a0\u9009\u9879\">\u7b2c\u00a047.6.1.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">54.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/19/protocol-logicalrep-message-formats.html\" title=\"54.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a054.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">54.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/19/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/datatype-numeric.html", "method": "same-major semantic node", "sha256": "9df887aaa2bbaf4b7ac5425771d79447e6c31d69138fa565f1cbf4638bdef499", "language": "zh", "matched_nodes": ["#DATATYPE-NUMERIC/div[9]/p[21]/span[4]"]}, {"url": "/docs/19/logicaldecoding-output-plugin.html", "method": "same-major semantic node", "sha256": "ee34ff74da4dde044716a8395e12b05737374fb6e15332debdced98641ae7b0d", "language": "zh", "matched_nodes": ["#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[11]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[13]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[1]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[3]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[5]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[7]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[9]"]}, {"url": "/docs/19/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "c37e5ac664282b632fcb2bb357ef00f4ca784287a05786a0f76f48f98749ea93", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/19/facts/0/label": "Interface family", "/versions/19/facts/0/value": "Logical-decoding output plugin", "/versions/19/facts/1/label": "Handler or routine", "/versions/19/facts/2/label": "Recorded callbacks", "/versions/19/tables/0/title": "Registered interface handlers", "/versions/19/tables/1/title": "Documented options", "/versions/19/tables/2/title": "Option names recognized by this plugin build", "/versions/19/related/0/label": "Logical decoding output interface", "/versions/19/related/1/label": "Existing extension catalogue identity", "/versions/19/related/2/label": "Logical Begin message", "/versions/19/related/3/label": "Logical Relation message", "/versions/19/related/4/label": "Logical tuple representation", "/versions/19/related/5/label": "Logical Stream Start message", "/versions/19/related/6/label": "Logical Prepare message", "/versions/19/sections/0/title": "Interface and capability boundaries", "/versions/19/sections/1/title": "Output and protocol boundaries", "/versions/19/sections/2/title": "Registered implementation in core source", "/versions/19/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/19/tables/1/rows/2/name": "binary", "/versions/19/tables/2/rows/0/name": "binary", "/versions/19/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/19/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/19/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/19/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/19/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/19/tables/0/rows/0/feature": "Begin transaction", "/versions/19/tables/0/rows/1/feature": "Row changes", "/versions/19/tables/0/rows/4/feature": "Logical messages", "/versions/19/tables/0/rows/5/feature": "Start streamed transaction", "/versions/19/tables/0/rows/6/feature": "Stream row changes", "/versions/19/tables/0/rows/7/feature": "Prepare transaction", "/versions/19/tables/0/rows/8/feature": "Commit prepared", "/versions/19/tables/0/rows/9/feature": "Rollback prepared", "/versions/19/tables/0/columns/0/label": "Interface operation", "/versions/19/tables/0/columns/1/label": "Source observation", "/versions/19/tables/0/columns/2/label": "Callback", "/versions/19/tables/0/columns/3/label": "Implementation", "/versions/19/tables/1/columns/0/label": "Option", "/versions/19/tables/1/columns/1/label": "Same-version definition", "/versions/19/tables/2/columns/0/label": "Source option name", "/versions/19/tables/1/rows/0/definition": "Specifies the protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported on server version 14 and above, and is required when streaming is set to on to stream large in-progress transactions. Version 3 is supported on server version 15 and above, and is required when two_phase is enabled to stream two-phase commits. Version 4 is supported on server version 16 and above, and is required when streaming is set to parallel to stream large in-progress transactions to be applied in parallel.", "/versions/19/tables/1/rows/1/definition": "A comma-separated list of publication names to subscribe to. The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/19/tables/1/rows/2/definition": "Enables binary transfer mode. Binary mode is faster than the text mode but slightly less robust. The default is off .", "/versions/19/tables/1/rows/3/definition": "Enables sending the messages that are written by pg_logical_emit_message . The default is off .", "/versions/19/tables/1/rows/4/definition": "Enables streaming of in-progress transactions. Valid values are off (the default), on and parallel . When set to off , pgoutput fully decodes a transaction before sending it as a whole. This mode works with any protocol version. When set to on , pgoutput streams large in-progress transactions. This requires protocol version 2 or higher. When set to parallel , pgoutput streams large in-progress transactions and also sends extra information in some messages to support parallel processing. This requires protocol version 4 or higher.", "/versions/19/tables/1/rows/5/definition": "Enables sending two-phase transactions. Minimum protocol version 3 is required to turn it on. The default is off .", "/versions/19/tables/1/rows/6/definition": "Specifies whether to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes. The default is any ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "592da12afedc9486bb5f6d3c541db073ce06846d3c95dbb79dcda790af708cac"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Specifies the protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported on server version 14 and above, and is required when streaming is set to on to stream large in-progress transactions. Version 3 is supported on server version 15 and above, and is required when two_phase is enabled to stream two-phase commits. Version 4 is supported on server version 16 and above, and is required when streaming is set to parallel to stream large in-progress transactions to be applied in parallel."}, {"name": "publication_names", "definition": "A comma-separated list of publication names to subscribe to. The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Enables binary transfer mode. Binary mode is faster than the text mode but slightly less robust. The default is off ."}, {"name": "messages", "definition": "Enables sending the messages that are written by pg_logical_emit_message . The default is off ."}, {"name": "streaming", "definition": "Enables streaming of in-progress transactions. Valid values are off (the default), on and parallel . When set to off , pgoutput fully decodes a transaction before sending it as a whole. This mode works with any protocol version. When set to on , pgoutput streams large in-progress transactions. This requires protocol version 2 or higher. When set to parallel , pgoutput streams large in-progress transactions and also sends extra information in some messages to support parallel processing. This requires protocol version 4 or higher."}, {"name": "two_phase", "definition": "Enables sending two-phase transactions. Minimum protocol version 3 is required to turn it on. The default is off ."}, {"name": "origin", "definition": "Specifies whether to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes. The default is any ."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "origin", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3", "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM": "4"}}, "comparison_hash": "761842f39eae1d9c23b64afdacc7bf910f49481118b5b15614b4b560b5e39432", "manual_language": "zh", "runtime_verified": false}, "20": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}, {"label": "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM", "value": "4"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u6307\u5b9a\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1 \u3001 2 \u3001 3 \u548c 4 \u3002\u5fc5\u987b\u63d0\u4f9b\u6709\u6548\u7684\u7248\u672c\u3002 \u7248\u672c 2 \u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff1b\u5f53 streaming \u8bbe\u7f6e\u4e3a on \u4ee5\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u7248\u672c\u3002 \u7248\u672c 3 \u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff1b\u5f53\u542f\u7528 two_phase \u4ee5\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u7248\u672c\u3002 \u7248\u672c 4 \u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff1b\u5f53 streaming \u8bbe\u7f6e\u4e3a parallel \u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u4ee5\u4f9b\u5e76\u884c\u5e94\u7528\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u7248\u672c\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "\u4e8c\u8fdb\u5236", "definition": "\u542f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002\u9ed8\u8ba4\u503c\u4e3a off \u3002"}, {"name": "messages", "definition": "\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002\u9ed8\u8ba4\u503c\u4e3a off \u3002"}, {"name": "streaming", "definition": "\u542f\u7528\u5bf9\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\u3002\u6709\u6548\u503c\u4e3a off \uff08\u9ed8\u8ba4\uff09\u3001 on \u548c parallel \u3002 \u5f53\u8bbe\u7f6e\u4e3a off \u65f6\uff0c pgoutput \u4f1a\u5148\u5b8c\u6574\u89e3\u7801\u4e00\u4e2a\u4e8b\u52a1\uff0c\u518d\u5c06\u5176\u6574\u4f53\u53d1\u9001\u3002\u8be5\u6a21\u5f0f\u9002\u7528\u4e8e\u4efb\u4f55\u534f\u8bae\u7248\u672c\u3002 \u5f53\u8bbe\u7f6e\u4e3a on \u65f6\uff0c pgoutput \u4f1a\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\u3002\u8fd9\u8981\u6c42\u534f\u8bae\u7248\u672c\u4e3a 2 \u6216\u66f4\u9ad8\u3002 \u5f53\u8bbe\u7f6e\u4e3a parallel \u65f6\uff0c pgoutput \u4f1a\u6d41\u5f0f\u4f20\u8f93\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5e76\u5728\u67d0\u4e9b\u6d88\u606f\u4e2d\u989d\u5916\u53d1\u9001\u4fe1\u606f\uff0c\u4ee5\u652f\u6301\u5e76\u884c\u5904\u7406\u3002\u8fd9\u8981\u6c42\u534f\u8bae\u7248\u672c\u4e3a 4 \u6216\u66f4\u9ad8\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u53d1\u9001\u4e24\u9636\u6bb5\u4e8b\u52a1\u3002\u5f00\u542f\u8be5\u9009\u9879\u81f3\u5c11\u9700\u8981\u534f\u8bae\u7248\u672c 3\u3002\u9ed8\u8ba4\u503c\u4e3a off \u3002"}, {"name": "origin", "definition": "\u6307\u5b9a\u662f\u5426\u6309\u6765\u6e90\u53d1\u9001\u66f4\u6539\u3002\u53ef\u9009\u503c\u5305\u62ec none \uff0c\u4ec5\u53d1\u9001\u6ca1\u6709\u5173\u8054\u6765\u6e90\u7684\u66f4\u6539\uff1b\u4ee5\u53ca any \uff0c\u4e0d\u8bba\u5176\u6765\u6e90\u4e3a\u4f55\u90fd\u53d1\u9001\u66f4\u6539\u3002\u8fd9\u53ef\u7528\u4e8e\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u51fa\u73b0\u73af\u8def\uff08\u540c\u4e00\u6570\u636e\u7684\u65e0\u9650\u590d\u5236\uff09\u3002\u9ed8\u8ba4\u503c\u4e3a any \u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "\u4e8c\u8fdb\u5236"}, {"name": "messages"}, {"name": "origin"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/devel/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=20", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=20", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=20", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=20", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=20", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 20devel source archive", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "source_snapshot_utc": "26-Sep-2026 20:22"}, "sources": [{"url": "https://pg.center/docs/devel/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 20 English manual", "sha256": "bc3dfd36641355a858bfecf035b81082f0fcce4f083edd1176ba2dba71bbdea0", "language": "en", "original_url": "/docs/devel/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "line": 262, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:262", "sha256": "76fc9fd190d2a233e54c0a56a511a641c8682a57d597cff7cdd6c998ca907963", "archive_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, {"url": "https://pg.center/docs/devel/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 20 English manual", "sha256": "c3155ae81ecabd273f3b326b0e44b4cf39954def59a10c58f50f7ec51ac1923c", "language": "en", "original_url": "/docs/devel/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "c382263abcd29845c0b06ea2152cdcea357993fe806bf8bf9c1cb00a0b7678dc", "archive_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">54.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">54.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\u53ef\u4ee5\u5411\u6307\u5b9a\u590d\u5236\u69fd\u5173\u8054\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u4f20\u9012\u9009\u9879\u3002\u6807\u51c6\uff08<code class=\"literal\">pgoutput</code>\uff09\u63d2\u4ef6\u63a5\u53d7\u7684\u9009\u9879\u89c1<a class=\"xref\" href=\"/docs/devel/logicaldecoding-output-plugin.html#LOGICALDECODING-PGOUTPUT-OPTIONS\" title=\"47.6.1.1.\u00a0\u9009\u9879\">\u7b2c\u00a047.6.1.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">54.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/devel/protocol-logicalrep-message-formats.html\" title=\"54.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a054.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u5728\u4ee3\u7801\u4e2d\u8868\u793a\u4e3a\u4e00\u4e2a\u5b57\u7b26\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">54.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/devel/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/datatype-numeric.html", "method": "same-major semantic node", "sha256": "0665cb43442d9b8746c08c0a932e17baf08f2e1d38162c0833593a4ff728eba5", "language": "zh", "matched_nodes": ["#DATATYPE-NUMERIC/div[9]/p[21]/span[4]"]}, {"url": "/docs/devel/logicaldecoding-output-plugin.html", "method": "same-major semantic node", "sha256": "e829a1bc7e501e409e43bb16c4fe48930d93bdf176587842e7700f5e4c6d9601", "language": "zh", "matched_nodes": ["#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[11]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[13]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[1]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[3]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[5]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[7]", "#LOGICALDECODING-OUTPUT-PLUGIN/div[3]/div[3]/div[1]/dl[0]/dd[9]"]}, {"url": "/docs/devel/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "f41998c9bf3d2453b68724b49a3a2d8e66cec708320154fea8af22ef6f229007", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[4]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]"]}], "language": "zh", "original_text": {"/summary": "The built-in output plugin used by PostgreSQL logical replication.", "/category": "Core replication", "/versions/20/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/20/facts/0/label": "Interface family", "/versions/20/facts/0/value": "Logical-decoding output plugin", "/versions/20/facts/1/label": "Handler or routine", "/versions/20/facts/2/label": "Recorded callbacks", "/versions/20/tables/0/title": "Registered interface handlers", "/versions/20/tables/1/title": "Documented options", "/versions/20/tables/2/title": "Option names recognized by this plugin build", "/versions/20/related/0/label": "Logical decoding output interface", "/versions/20/related/1/label": "Existing extension catalogue identity", "/versions/20/related/2/label": "Logical Begin message", "/versions/20/related/3/label": "Logical Relation message", "/versions/20/related/4/label": "Logical tuple representation", "/versions/20/related/5/label": "Logical Stream Start message", "/versions/20/related/6/label": "Logical Prepare message", "/versions/20/sections/0/title": "Interface and capability boundaries", "/versions/20/sections/1/title": "Output and protocol boundaries", "/versions/20/sections/2/title": "Registered implementation in core source", "/versions/20/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/20/tables/1/rows/2/name": "binary", "/versions/20/tables/2/rows/0/name": "binary", "/versions/20/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/20/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/20/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/20/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/20/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/20/tables/0/rows/0/feature": "Begin transaction", "/versions/20/tables/0/rows/1/feature": "Row changes", "/versions/20/tables/0/rows/4/feature": "Logical messages", "/versions/20/tables/0/rows/5/feature": "Start streamed transaction", "/versions/20/tables/0/rows/6/feature": "Stream row changes", "/versions/20/tables/0/rows/7/feature": "Prepare transaction", "/versions/20/tables/0/rows/8/feature": "Commit prepared", "/versions/20/tables/0/rows/9/feature": "Rollback prepared", "/versions/20/tables/0/columns/0/label": "Interface operation", "/versions/20/tables/0/columns/1/label": "Source observation", "/versions/20/tables/0/columns/2/label": "Callback", "/versions/20/tables/0/columns/3/label": "Implementation", "/versions/20/tables/1/columns/0/label": "Option", "/versions/20/tables/1/columns/1/label": "Same-version definition", "/versions/20/tables/2/columns/0/label": "Source option name", "/versions/20/collection_tables/0/title": "Logical-decoding plugin candidates", "/versions/20/collection_tables/1/title": "Primary-source capability observations", "/versions/20/tables/1/rows/0/definition": "Specifies the protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported on server version 14 and above, and is required when streaming is set to on to stream large in-progress transactions. Version 3 is supported on server version 15 and above, and is required when two_phase is enabled to stream two-phase commits. Version 4 is supported on server version 16 and above, and is required when streaming is set to parallel to stream large in-progress transactions to be applied in parallel.", "/versions/20/tables/1/rows/1/definition": "A comma-separated list of publication names to subscribe to. The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/20/tables/1/rows/2/definition": "Enables binary transfer mode. Binary mode is faster than the text mode but slightly less robust. The default is off .", "/versions/20/tables/1/rows/3/definition": "Enables sending the messages that are written by pg_logical_emit_message . The default is off .", "/versions/20/tables/1/rows/4/definition": "Enables streaming of in-progress transactions. Valid values are off (the default), on and parallel . When set to off , pgoutput fully decodes a transaction before sending it as a whole. This mode works with any protocol version. When set to on , pgoutput streams large in-progress transactions. This requires protocol version 2 or higher. When set to parallel , pgoutput streams large in-progress transactions and also sends extra information in some messages to support parallel processing. This requires protocol version 4 or higher.", "/versions/20/tables/1/rows/5/definition": "Enables sending two-phase transactions. Minimum protocol version 3 is required to turn it on. The default is off .", "/versions/20/tables/1/rows/6/definition": "Specifies whether to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes. The default is any .", "/versions/20/collection_tables/0/caption": "Current catalogue observation 2026-09-29 from pgext.universe. Extension versions, source metadata dates and declared PostgreSQL compatibility are independent of the selected core version. Catalogue classification does not establish capabilities or maintenance support.", "/versions/20/collection_tables/1/caption": "Each statement applies to its named extension version and immutable source revision. Unlisted capabilities remain unknown. These are documentation observations, not runtime tests or current maintenance guarantees.", "/versions/20/collection_tables/0/rows/0/scope": "Primary documentation reviewed separately below", "/versions/20/collection_tables/0/rows/1/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/2/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/3/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/4/scope": "Core interface; see versioned entry", "/versions/20/collection_tables/0/rows/5/scope": "Core interface; see versioned entry", "/versions/20/collection_tables/0/rows/6/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/7/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/8/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/9/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/1/rows/0/state": "Verified in documentation", "/versions/20/collection_tables/1/rows/1/state": "Conditional", "/versions/20/collection_tables/1/rows/2/state": "Conditional", "/versions/20/collection_tables/1/rows/3/state": "Verified in documentation", "/versions/20/collection_tables/1/rows/4/state": "Unknown", "/versions/20/collection_tables/0/rows/10/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/1/rows/0/detail": "Format 1 emits one JSON object per transaction; format 2 emits one per tuple with optional transaction boundaries.", "/versions/20/collection_tables/1/rows/1/detail": "UPDATE and DELETE old-row availability depends on replica identity.", "/versions/20/collection_tables/1/rows/2/detail": "The actions option controls changes; format 1 excludes TRUNCATE for compatibility.", "/versions/20/collection_tables/1/rows/3/detail": "Options select or exclude tables, origins and logical-message prefixes.", "/versions/20/collection_tables/1/rows/4/detail": "A streaming-protocol connection does not itself establish these capabilities; this documentation review does not verify them.", "/versions/20/collection_tables/0/rows/4/checked": "Not recorded", "/versions/20/collection_tables/0/rows/5/checked": "Not recorded", "/versions/20/collection_tables/0/columns/0/label": "Existing extension", "/versions/20/collection_tables/0/columns/1/label": "Catalogued version", "/versions/20/collection_tables/0/columns/2/label": "Declared PG majors", "/versions/20/collection_tables/0/columns/3/label": "Metadata checked", "/versions/20/collection_tables/0/columns/4/label": "Evidence scope", "/versions/20/collection_tables/0/columns/5/label": "Catalogued purpose", "/versions/20/collection_tables/0/rows/6/postgres": "Unknown", "/versions/20/collection_tables/0/rows/7/postgres": "Unknown", "/versions/20/collection_tables/0/rows/8/postgres": "Unknown", "/versions/20/collection_tables/0/rows/9/postgres": "Unknown", "/versions/20/collection_tables/1/columns/0/label": "Extension", "/versions/20/collection_tables/1/columns/1/label": "Reviewed version", "/versions/20/collection_tables/1/columns/2/label": "Capability", "/versions/20/collection_tables/1/columns/3/label": "Evidence state", "/versions/20/collection_tables/1/columns/4/label": "Conditions", "/versions/20/collection_tables/1/columns/5/label": "Evidence date and source", "/versions/20/collection_tables/0/rows/10/postgres": "Unknown", "/versions/20/collection_tables/1/rows/0/capability": "Output granularity", "/versions/20/collection_tables/1/rows/1/capability": "Old row values", "/versions/20/collection_tables/1/rows/3/capability": "Table and message filters", "/versions/20/collection_tables/1/rows/4/capability": "In-progress transaction streaming / two-phase decoding", "/versions/20/collection_tables/0/rows/0/description": "Changing data capture in JSON format", "/versions/20/collection_tables/0/rows/1/description": "PostgreSQL logical decoding output plugin for MongoDB", "/versions/20/collection_tables/0/rows/2/description": "Logical decoding plugin that delivers WAL stream changes using a Protocol Buffer format", "/versions/20/collection_tables/0/rows/3/description": "Output plugin for logical replication in Raw SQL format", "/versions/20/collection_tables/0/rows/4/description": "SQL-based test/example module for WAL logical decoding", "/versions/20/collection_tables/0/rows/5/description": "Logical Replication output plugin", "/versions/20/collection_tables/0/rows/6/description": "JSON logical decoding output plugin", "/versions/20/collection_tables/0/rows/7/description": "Logical-decoding output plugin and Python consumer framework for streaming PostgreSQL row changes as JSON.", "/versions/20/collection_tables/0/rows/8/description": "Unreleased logical decoding output-plugin prototype that emits JSON changes through PostgreSQL, Kafka, or Nanomsg.", "/versions/20/collection_tables/0/rows/9/description": "Binary logical-decoding output plugin that encodes PostgreSQL changes as Protocol Buffers.", "/versions/20/collection_tables/0/rows/10/description": "Postgres output plugin for replicating data to Turso."}, "fallback_fields": [], "source_language": "en", "extension_sources": [{"method": "existing extension catalogue", "sha256": "ad69a4751d327c6a70a4461a16cc9a320da314ce9b1304f28872d7fa7e6a2f89", "extension": "wal2json"}, {"method": "existing extension catalogue", "sha256": "77e07b939212bb4186335695b086de3ec2bcdfe22aef610a9b9594f5bb552b45", "extension": "wal2mongo"}, {"method": "existing extension catalogue", "sha256": "6cf532aa84f0d7df8986b04f425b5f27dcdb8834af37846477854a75080da180", "extension": "decoderbufs"}, {"method": "existing extension catalogue", "sha256": "08c7387339951bb31fd85fcbb8873ac616c7543b65e0faab2db78650de73299e", "extension": "decoder_raw"}, {"method": "existing extension catalogue", "sha256": "41c79b7208acfa2f0e01afcec319e653f2a9f2c5cf50baf981aa8fc2103f7297", "extension": "test_decoding"}, {"method": "existing extension catalogue", "sha256": "7e4171a3d4ffae379a3b80a832e7a927c35f1b25e492cf194b71b05b72e30615", "extension": "pgoutput"}, {"method": "existing extension catalogue", "sha256": "2b027e84959d992cc451e5a2929b96c8c28a6e07f447dc6895dfd9b4c0ba3fbb", "extension": "jsoncdc"}, {"method": "existing extension catalogue", "sha256": "d38bf0154f7b7dcb901d626d30624e2666810b141c27c78480f775b301a3704c", "extension": "replisome"}, {"method": "existing extension catalogue", "sha256": "0b92c25206113d809eaf2d134ac89496985228859ffcb30a55a1a7e42f51465a", "extension": "putpostlogic"}, {"method": "existing extension catalogue", "sha256": "1a7f59b05527493efe804a3024d74f70e6df27c3830a7fdecdfc173b7e29e481", "extension": "pboutput"}, {"method": "existing extension catalogue", "sha256": "1f6a272e46a7442f17ba9e5d4420f15e54748db8e2544cfd96a31102e327231a", "extension": "pg_turso"}], "original_snapshot_sha256": "7196dd18ac63a7c20581ec8fb83ebe0c53b5abcc211eebb55f22bea52350dc45"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Specifies the protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported on server version 14 and above, and is required when streaming is set to on to stream large in-progress transactions. Version 3 is supported on server version 15 and above, and is required when two_phase is enabled to stream two-phase commits. Version 4 is supported on server version 16 and above, and is required when streaming is set to parallel to stream large in-progress transactions to be applied in parallel."}, {"name": "publication_names", "definition": "A comma-separated list of publication names to subscribe to. The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Enables binary transfer mode. Binary mode is faster than the text mode but slightly less robust. The default is off ."}, {"name": "messages", "definition": "Enables sending the messages that are written by pg_logical_emit_message . The default is off ."}, {"name": "streaming", "definition": "Enables streaming of in-progress transactions. Valid values are off (the default), on and parallel . When set to off , pgoutput fully decodes a transaction before sending it as a whole. This mode works with any protocol version. When set to on , pgoutput streams large in-progress transactions. This requires protocol version 2 or higher. When set to parallel , pgoutput streams large in-progress transactions and also sends extra information in some messages to support parallel processing. This requires protocol version 4 or higher."}, {"name": "two_phase", "definition": "Enables sending two-phase transactions. Minimum protocol version 3 is required to turn it on. The default is off ."}, {"name": "origin", "definition": "Specifies whether to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes. The default is any ."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "origin", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3", "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM": "4"}}, "comparison_hash": "761842f39eae1d9c23b64afdacc7bf910f49481118b5b15614b4b560b5e39432", "manual_language": "zh", "runtime_verified": false, "collection_tables": [{"key": "decode-catalogue", "rows": [{"scope": "\u4e0b\u65b9\u5355\u72ec\u6838\u9a8c\u4e00\u624b\u6587\u6863", "checked": "2026-08-30", "version": "2.6", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/wal2json/", "text": "wal2json"}, "description": "\u7528\u903b\u8f91\u89e3\u7801\u6355\u83b7 JSON \u683c\u5f0f\u7684 CDC \u53d8\u66f4"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0.7", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/wal2mongo/", "text": "wal2mongo"}, "description": "\u4f7f\u7528\u903b\u8f91\u89e3\u7801\u6355\u83b7MongoDB JSON\u683c\u5f0f\u7684CDC\u53d8\u66f4"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "3.6.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/decoderbufs/", "text": "decoderbufs"}, "description": "\u5c06WAL\u903b\u8f91\u89e3\u7801\u4e3aProtocolBuffer\u534f\u8bae\u7684\u6d88\u606f"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/decoder_raw/", "text": "decoder_raw"}, "description": "\u903b\u8f91\u590d\u5236\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\uff1aRAW SQL\u683c\u5f0f"}, {"scope": "\u6838\u5fc3\u63a5\u53e3\uff1b\u8be6\u89c1\u5bf9\u5e94\u7248\u672c\u6761\u76ee", "checked": "\u672a\u8bb0\u5f55", "version": "-", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/test_decoding/", "text": "test_decoding"}, "description": "\u57fa\u4e8eSQL\u7684WAL\u903b\u8f91\u89e3\u7801\u6837\u4f8b"}, {"scope": "\u6838\u5fc3\u63a5\u53e3\uff1b\u8be6\u89c1\u5bf9\u5e94\u7248\u672c\u6761\u76ee", "checked": "\u672a\u8bb0\u5f55", "version": "-", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/pgoutput/", "text": "pgoutput"}, "description": "PG\u5185\u7f6e\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/jsoncdc/", "text": "jsoncdc"}, "description": "\u5c06 PostgreSQL \u903b\u8f91\u89e3\u7801\u53d8\u66f4\u6d41\u8f6c\u6362\u4e3a\u9010\u884c JSON \u7684 Rust \u8f93\u51fa\u63d2\u4ef6\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/replisome/", "text": "replisome"}, "description": "\u901a\u8fc7\u903b\u8f91\u89e3\u7801\u5c06 PostgreSQL \u884c\u53d8\u66f4\u4ee5 JSON \u6d41\u8f93\u51fa\uff0c\u5e76\u63d0\u4f9b Python \u6d88\u8d39\u6846\u67b6\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/putpostlogic/", "text": "putpostlogic"}, "description": "\u672a\u53d1\u5e03\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u539f\u578b\uff0c\u53ef\u5c06 JSON \u53d8\u66f4\u901a\u8fc7 PostgreSQL\u3001Kafka \u6216 Nanomsg \u8f93\u51fa\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pboutput/", "text": "pboutput"}, "description": "\u4f7f\u7528Protocol Buffers\u7f16\u7801PostgreSQL\u53d8\u5316\u7684\u903b\u8f91\u89e3\u7801\u4e8c\u8fdb\u5236\u8f93\u51fa\u63d2\u4ef6"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pg_turso/", "text": "pg_turso"}, "description": "\u5c06\u6570\u636e\u590d\u5236\u5230Turso\u7684Postgres\u63d2\u4ef6"}], "title": "\u903b\u8f91\u89e3\u7801\u63d2\u4ef6\u5019\u9009", "caption": "\u6765\u81ea pgext.universe \u7684\u76ee\u5f55\u89c2\u5bdf\uff0c\u65e5\u671f\u4e3a 2026-09-29\u3002\u6269\u5c55\u7248\u672c\u3001\u6765\u6e90\u5143\u6570\u636e\u65e5\u671f\u548c\u58f0\u660e\u7684 PostgreSQL \u517c\u5bb9\u8303\u56f4\u5747\u72ec\u7acb\u4e8e\u6240\u9009\u6838\u5fc3\u7248\u672c\u3002\u76ee\u5f55\u5206\u7c7b\u4e0d\u80fd\u8bc1\u660e\u5177\u4f53\u80fd\u529b\u6216\u7ef4\u62a4\u652f\u6301\u3002", "columns": [{"key": "extension", "label": "\u73b0\u6709\u6269\u5c55"}, {"key": "version", "label": "\u76ee\u5f55\u8bb0\u8f7d\u7684\u7248\u672c"}, {"key": "postgres", "label": "\u58f0\u660e\u517c\u5bb9\u7684 PG \u5927\u7248\u672c"}, {"key": "checked", "label": "\u5143\u6570\u636e\u6838\u9a8c\u65f6\u95f4"}, {"key": "scope", "label": "\u8bc1\u636e\u8303\u56f4"}, {"key": "description", "label": "\u76ee\u5f55\u8bb0\u8f7d\u7684\u7528\u9014"}]}, {"key": "decode-reviewed-capabilities", "rows": [{"state": "\u6587\u6863\u5df2\u8bc1\u5b9e", "detail": "\u683c\u5f0f 1 \u4e3a\u6bcf\u4e2a\u4e8b\u52a1\u8f93\u51fa\u4e00\u4e2a JSON \u5bf9\u8c61\uff1b\u683c\u5f0f 2 \u4e3a\u6bcf\u4e2a\u5143\u7ec4\u8f93\u51fa\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5e76\u53ef\u9009\u8f93\u51fa\u4e8b\u52a1\u8fb9\u754c\u3002", "version": "2.6", "evidence": {"url": "https://github.com/eulerto/wal2json/blob/75629c2e1e81a12350cc9d63782fc53252185d8d/README.md", "text": "2026-09-29 \u00b7 75629c2e1e81 \u00b7 README.md"}, "extension": {"url": "/e/wal2json/", "text": "wal2json"}, "capability": "\u8f93\u51fa\u7c92\u5ea6"}, {"state": "\u6709\u6761\u4ef6", "detail": "UPDATE \u548c DELETE \u80fd\u5426\u63d0\u4f9b\u65e7\u884c\u503c\u53d6\u51b3\u4e8e\u590d\u5236\u6807\u8bc6\u3002", "version": "2.6", "evidence": {"url": "https://github.com/eulerto/wal2json/blob/75629c2e1e81a12350cc9d63782fc53252185d8d/README.md", "text": "2026-09-29 \u00b7 75629c2e1e81 \u00b7 README.md"}, "extension": {"url": "/e/wal2json/", "text": "wal2json"}, "capability": "\u65e7\u884c\u503c"}, {"state": "\u6709\u6761\u4ef6", "detail": "actions \u9009\u9879\u63a7\u5236\u53d8\u66f4\u7c7b\u578b\uff1b\u4e3a\u4fdd\u6301\u517c\u5bb9\u6027\uff0c\u683c\u5f0f 1 \u4e0d\u5305\u542b TRUNCATE\u3002", "version": "2.6", "evidence": {"url": "https://github.com/eulerto/wal2json/blob/75629c2e1e81a12350cc9d63782fc53252185d8d/README.md", "text": "2026-09-29 \u00b7 75629c2e1e81 \u00b7 README.md"}, "extension": {"url": "/e/wal2json/", "text": "wal2json"}, "capability": "TRUNCATE"}, {"state": "\u6587\u6863\u5df2\u8bc1\u5b9e", "detail": "\u901a\u8fc7\u9009\u9879\u9009\u62e9\u6216\u6392\u9664\u8868\u3001\u6765\u6e90\u548c\u903b\u8f91\u6d88\u606f\u524d\u7f00\u3002", "version": "2.6", "evidence": {"url": "https://github.com/eulerto/wal2json/blob/75629c2e1e81a12350cc9d63782fc53252185d8d/README.md", "text": "2026-09-29 \u00b7 75629c2e1e81 \u00b7 README.md"}, "extension": {"url": "/e/wal2json/", "text": "wal2json"}, "capability": "\u8868\u548c\u6d88\u606f\u8fc7\u6ee4"}, {"state": "\u672a\u77e5", "detail": "\u4ec5\u5efa\u7acb\u6d41\u534f\u8bae\u8fde\u63a5\u4e0d\u8db3\u4ee5\u8bc1\u660e\u8fd9\u4e9b\u80fd\u529b\uff0c\u672c\u6b21\u6587\u6863\u6838\u9a8c\u5c1a\u672a\u786e\u8ba4\u5b83\u4eec\u3002", "version": "2.6", "evidence": {"url": "https://github.com/eulerto/wal2json/blob/75629c2e1e81a12350cc9d63782fc53252185d8d/README.md", "text": "2026-09-29 \u00b7 75629c2e1e81 \u00b7 README.md"}, "extension": {"url": "/e/wal2json/", "text": "wal2json"}, "capability": "\u8fdb\u884c\u4e2d\u4e8b\u52a1\u7684\u6d41\u5f0f\u4f20\u8f93\uff0f\u4e24\u9636\u6bb5\u89e3\u7801"}], "title": "\u4e00\u624b\u6765\u6e90\u8bb0\u8f7d\u7684\u80fd\u529b", "caption": "\u6bcf\u9879\u58f0\u660e\u4ec5\u9002\u7528\u4e8e\u5176\u4e2d\u6307\u660e\u7684\u6269\u5c55\u7248\u672c\u548c\u56fa\u5b9a\u6765\u6e90\u4fee\u8ba2\u3002\u672a\u5217\u51fa\u7684\u80fd\u529b\u4ecd\u4e3a\u672a\u77e5\u3002\u8fd9\u4e9b\u662f\u6587\u6863\u89c2\u5bdf\uff0c\u4e0d\u662f\u8fd0\u884c\u65f6\u6d4b\u8bd5\u6216\u5f53\u524d\u7ef4\u62a4\u4fdd\u8bc1\u3002", "columns": [{"key": "extension", "label": "\u6269\u5c55"}, {"key": "version", "label": "\u5df2\u6838\u9a8c\u7248\u672c"}, {"key": "capability", "label": "\u80fd\u529b"}, {"key": "state", "label": "\u8bc1\u636e\u72b6\u6001"}, {"key": "detail", "label": "\u9002\u7528\u6761\u4ef6"}, {"key": "evidence", "label": "\u8bc1\u636e\u65e5\u671f\u4e0e\u6765\u6e90"}]}], "extension_reviews": [{"kind": "decode", "name": "wal2json", "claims": [{"text": "Format 1 emits one JSON object per transaction; format 2 emits one per tuple with optional transaction boundaries.", "label": "Output granularity", "state": "Verified in documentation"}, {"text": "UPDATE and DELETE old-row availability depends on replica identity.", "label": "Old row values", "state": "Conditional"}, {"text": "The actions option controls changes; format 1 excludes TRUNCATE for compatibility.", "label": "TRUNCATE", "state": "Conditional"}, {"text": "Options select or exclude tables, origins and logical-message prefixes.", "label": "Table and message filters", "state": "Verified in documentation"}, {"text": "A streaming-protocol connection does not itself establish these capabilities; this documentation review does not verify them.", "label": "In-progress transaction streaming / two-phase decoding", "state": "Unknown"}], "sources": [{"url": "https://github.com/eulerto/wal2json/blob/75629c2e1e81a12350cc9d63782fc53252185d8d/README.md", "path": "README.md", "sha256": "efa1cb3070aa6f9f5694885555b9856e6412bdb53ebb89eb00d769ab06a9c431", "local_name": "wal2json-readme.txt"}], "version": "2.6", "revision": "75629c2e1e81a12350cc9d63782fc53252185d8d", "checked_at": "2026-09-29"}], "catalog_observation": {"sha256": "a8f35f83709025575037ce50331f20fc27727e478464e35b48bb501e687cc121", "source": "data.pgext.universe", "identities": [{"id": 9630, "name": "wal2json"}, {"id": 9640, "name": "wal2mongo"}, {"id": 9650, "name": "decoderbufs"}, {"id": 9660, "name": "decoder_raw"}, {"id": 9970, "name": "test_decoding"}, {"id": 9980, "name": "pgoutput"}, {"id": 100073, "name": "jsoncdc"}, {"id": 100315, "name": "replisome"}, {"id": 100678, "name": "putpostlogic"}, {"id": 101508, "name": "pboutput"}, {"id": 101638, "name": "pg_turso"}], "observed_at": "2026-09-29T15:02:21.407129+00:00", "catalogue_rows": 2452, "candidate_count": 11}}}}, "snapshot": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "_PG_output_plugin_init"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "20"}, {"label": "LOGICALREP_PROTO_MIN_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_VERSION_NUM", "value": "1"}, {"label": "LOGICALREP_PROTO_STREAM_VERSION_NUM", "value": "2"}, {"label": "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM", "value": "3"}, {"label": "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM", "value": "4"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u4e8b\u52a1", "callback": "begin_cb", "implementation": "pgoutput_begin_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u884c\u53d8\u66f4", "callback": "change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "Commit", "callback": "commit_cb", "implementation": "pgoutput_commit_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "truncate_cb", "implementation": "pgoutput_truncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u903b\u8f91\u6d88\u606f", "callback": "message_cb", "implementation": "pgoutput_message"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f00\u59cb\u6d41\u5f0f\u4e8b\u52a1", "callback": "stream_start_cb", "implementation": "pgoutput_stream_start"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6d41\u5f0f\u884c\u53d8\u66f4", "callback": "stream_change_cb", "implementation": "pgoutput_change"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u51c6\u5907\u4e8b\u52a1", "callback": "prepare_cb", "implementation": "pgoutput_prepare_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u63d0\u4ea4\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "commit_prepared_cb", "implementation": "pgoutput_commit_prepared_txn"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u56de\u6eda\u5df2\u51c6\u5907\u4e8b\u52a1", "callback": "rollback_prepared_cb", "implementation": "pgoutput_rollback_prepared_txn"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "proto_version", "definition": "\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7248\u672c 1\u30012\u30013 \u548c 4\uff0c\u5fc5\u987b\u6307\u5b9a\u6709\u6548\u7248\u672c\u3002\u7248\u672c 2 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u3002\u7248\u672c 3 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002\u7248\u672c 4 \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u652f\u6301\uff0c\u53ef\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002"}, {"name": "publication_names", "definition": "\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002"}, {"name": "\u4e8c\u8fdb\u5236", "definition": "\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002"}, {"name": "messages", "definition": "\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 pg_logical_emit_message \u5199\u5165\u7684\u6d88\u606f\u3002"}, {"name": "streaming", "definition": "\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a off \uff08\u9ed8\u8ba4\uff09\u3001 on \u548c parallel \u3002 parallel \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a on \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a parallel \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002"}, {"name": "two_phase", "definition": "\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002"}, {"name": "origin", "definition": "\u6309\u6765\u6e90\u53d1\u9001\u53d8\u66f4\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a none \uff08\u4ec5\u53d1\u9001\u65e0\u6765\u6e90\u4fe1\u606f\u7684\u53d8\u66f4\uff09\u6216 any \uff08\u65e0\u8bba\u6765\u6e90\u5747\u53d1\u9001\uff09\u3002\u8be5\u9009\u9879\u53ef\u7528\u4e8e\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff08\u540c\u4e00\u6570\u636e\u65e0\u9650\u590d\u5236\uff09\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}, {"key": "source-options", "rows": [{"name": "\u4e8c\u8fdb\u5236"}, {"name": "messages"}, {"name": "origin"}, {"name": "proto_version"}, {"name": "publication_names"}, {"name": "streaming"}, {"name": "two_phase"}], "title": "\u672c\u6784\u5efa\u8bc6\u522b\u7684\u63d2\u4ef6\u9009\u9879\u540d", "caption": "\u4ece\u9009\u9879\u89e3\u6790\u5668\u4e2d\u63d0\u53d6\uff1b\u4ec5\u51ed\u540d\u79f0\u65e0\u6cd5\u786e\u5b9a\u9ed8\u8ba4\u503c\u3001\u53ef\u63a5\u53d7\u7684\u53d6\u503c\u6216\u534f\u8bae\u8981\u6c42\u3002", "columns": [{"key": "name", "label": "\u6e90\u7801\u9009\u9879\u540d"}]}], "related": [{"url": "/docs/18/logicaldecoding-output-plugin.html", "label": "\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63a5\u53e3"}, {"url": "/e/pgoutput/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/protocol/logical-begin/?v=18", "label": "\u903b\u8f91\u590d\u5236 Begin \u6d88\u606f"}, {"url": "/wiki/protocol/logical-relation/?v=18", "label": "\u903b\u8f91\u590d\u5236 Relation \u6d88\u606f"}, {"url": "/wiki/protocol/logical-tupledata/?v=18", "label": "\u903b\u8f91\u5143\u7ec4\u8868\u793a"}, {"url": "/wiki/protocol/logical-stream-start/?v=18", "label": "\u903b\u8f91\u590d\u5236 Stream Start \u6d88\u606f"}, {"url": "/wiki/protocol/logical-prepare/?v=18", "label": "\u903b\u8f91\u590d\u5236 Prepare \u6d88\u606f"}], "release": {"ref": "PostgreSQL 18.6 source archive", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/18/protocol-logical-replication.html", "path": "protocol-logical-replication.html", "label": "PostgreSQL 18 English manual", "sha256": "db5675868e641807e48ae6e19f51ed2a9bc9a29bd1b7a365c16eb3cae022a18e", "language": "en", "original_url": "/docs/18/protocol-logical-replication.html"}, {"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "line": 262, "path": "src/backend/replication/pgoutput/pgoutput.c", "label": "src/backend/replication/pgoutput/pgoutput.c:262", "sha256": "0a16f2abc3218286200f1a0a9c1d67fb7115ec0145b5edd7e4bd66ecb4d07566", "archive_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, {"url": "https://pg.center/docs/18/logicaldecoding-output-plugin.html", "path": "logicaldecoding-output-plugin.html", "label": "PostgreSQL 18 English manual", "sha256": "e5b3d13adfcc9e33f24524cb09d93eb91a1292fdb3124234002ccccf93f45738", "language": "en", "original_url": "/docs/18/logicaldecoding-output-plugin.html"}, {"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "path": "src/include/replication/logicalproto.h", "label": "Logical replication protocol constants", "sha256": "1c6101fa446aabe8d78a722fe62c4fce647f5b492ab4d7b460907ce73e035180", "archive_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u8f93\u51fa\u4e0e\u534f\u8bae\u8fb9\u754c", "paragraphs": ["\u56de\u8c03\u662f\u5426\u5b58\u5728\u3001\u534f\u8bae\u7248\u672c\u3001\u5ba2\u6237\u7aef\u534f\u5546\u53ca\u5df2\u542f\u7528\u7684\u63d2\u4ef6\u9009\u9879\u5206\u522b\u8bb0\u5f55\u3002\u6d41\u5f0f\u5904\u7406\u548c\u4e24\u9636\u6bb5\u5904\u7406\u9700\u8981\u5339\u914d\u7684\u534f\u8bae\u4e0e\u914d\u7f6e\u3002", "test_decoding \u662f\u793a\u4f8b\uff0f\u6d4b\u8bd5\u8f93\u51fa\u683c\u5f0f\uff0cpgoutput \u5b9e\u73b0\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u4e24\u8005\u7684\u8f93\u51fa\u7ea6\u5b9a\u4e0d\u53ef\u4e92\u6362\u3002"]}, {"code": "{\n\tcb->startup_cb = pgoutput_startup;\n\tcb->begin_cb = pgoutput_begin_txn;\n\tcb->change_cb = pgoutput_change;\n\tcb->truncate_cb = pgoutput_truncate;\n\tcb->message_cb = pgoutput_message;\n\tcb->commit_cb = pgoutput_commit_txn;\n\n\tcb->begin_prepare_cb = pgoutput_begin_prepare_txn;\n\tcb->prepare_cb = pgoutput_prepare_txn;\n\tcb->commit_prepared_cb = pgoutput_commit_prepared_txn;\n\tcb->rollback_prepared_cb = pgoutput_rollback_prepared_txn;\n\tcb->filter_by_origin_cb = pgoutput_origin_filter;\n\tcb->shutdown_cb = pgoutput_shutdown;\n\n\t/* transaction streaming */\n\tcb->stream_start_cb = pgoutput_stream_start;\n\tcb->stream_stop_cb = pgoutput_stream_stop;\n\tcb->stream_abort_cb = pgoutput_stream_abort;\n\tcb->stream_commit_cb = pgoutput_stream_commit;\n\tcb->stream_change_cb = pgoutput_change;\n\tcb->stream_message_cb = pgoutput_message;\n\tcb->stream_truncate_cb = pgoutput_truncate;\n\t/* transaction streaming - two-phase commit */\n\tcb->stream_prepare_cb = pgoutput_stream_prepare_txn;\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "description": ["PostgreSQL \u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u5185\u7f6e\u8f93\u51fa\u63d2\u4ef6\u3002"], "manual_html": "<div class=\"sect1\" id=\"PROTOCOL-LOGICAL-REPLICATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">54.5.\u00a0\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ecb\u7ecd\u903b\u8f91\u590d\u5236\u534f\u8bae\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u590d\u5236\u547d\u4ee4<code class=\"literal\">START_REPLICATION</code> <code class=\"literal\">SLOT</code> <em class=\"replaceable\"><code>slot_name</code></em> <code class=\"literal\">LOGICAL</code>\u5f00\u59cb\u7684\u6d88\u606f\u6d41\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u6d41\u590d\u5236\u534f\u8bae\u6784\u5efa\u5728\u7269\u7406\u6d41\u590d\u5236\u534f\u8bae\u7684\u57fa\u672c\u673a\u5236\u4e4b\u4e0a\u3002</p>\n<p lang=\"zh\"><span class=\"productname\">PostgreSQL</span> \u7684\u903b\u8f91\u89e3\u7801\u652f\u6301\u8f93\u51fa\u63d2\u4ef6\u3002<code class=\"literal\">pgoutput</code> \u662f\u5185\u7f6e\u903b\u8f91\u590d\u5236\u4f7f\u7528\u7684\u6807\u51c6\u63d2\u4ef6\u3002</p>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-REPLICATION-PARAMS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS\">54.5.1. \u903b\u8f91\u6d41\u590d\u5236\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"literal\">START_REPLICATION</code>\u547d\u4ee4\uff0c<code class=\"literal\">pgoutput</code>\u63a5\u53d7\u4ee5\u4e0b\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\">proto_version</span></dt>\n<dd>\n<p lang=\"zh\">\u534f\u8bae\u7248\u672c\u3002\u76ee\u524d\u652f\u6301\u7684\u7248\u672c\u6709 <code class=\"literal\">1</code>\u3001<code class=\"literal\">2</code>\u3001<code class=\"literal\">3</code> \u548c <code class=\"literal\">4</code>\u3002\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7248\u672c\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">2</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 14 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u6b63\u5728\u8fdb\u884c\u7684\u5927\u578b\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">3</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 15 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u6d41\u5f0f\u4f20\u8f93\u4e24\u9636\u6bb5\u63d0\u4ea4\u3002</p>\n<p lang=\"zh\">\u7248\u672c <code class=\"literal\">4</code> \u4ec5\u5728\u670d\u52a1\u5668\u7248\u672c 16 \u53ca\u4ee5\u4e0a\u53d7\u652f\u6301\uff0c\u5141\u8bb8\u5e76\u884c\u5e94\u7528\u8fdb\u884c\u4e2d\u7684\u5927\u578b\u4e8b\u52a1\u6d41\u3002</p>\n</dd>\n<dt><span class=\"term\">publication_names</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8ba2\u9605\uff08\u63a5\u6536\u53d8\u66f4\uff09\u7684\u53d1\u5e03\u540d\u79f0\u5217\u8868\uff0c\u4ee5\u9017\u53f7\u5206\u9694\u3002\u5404\u4e2a\u53d1\u5e03\u540d\u79f0\u6309\u6807\u51c6\u5bf9\u8c61\u540d\u5904\u7406\uff0c\u53ef\u6309\u9700\u52a0\u5f15\u53f7\u3002\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt lang=\"zh\"><em>\u4e8c\u8fdb\u5236</em></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528\u4e8c\u8fdb\u5236\u4f20\u8f93\u6a21\u5f0f\u7684\u5e03\u5c14\u9009\u9879\u3002\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6bd4\u6587\u672c\u6a21\u5f0f\u66f4\u5feb\uff0c\u4f46\u7a33\u5065\u6027\u7565\u5dee\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">messages</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5e03\u5c14\u9009\u9879\uff0c\u7528\u4e8e\u542f\u7528\u53d1\u9001\u7531 <code class=\"function\">pg_logical_emit_message</code> \u5199\u5165\u7684\u6d88\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">streaming</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u884c\u4e2d\u4e8b\u52a1\u6d41\u5f0f\u4f20\u8f93\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">off</code>\uff08\u9ed8\u8ba4\uff09\u3001<code class=\"literal\">on</code> \u548c <code class=\"literal\">parallel</code>\u3002<code class=\"literal\">parallel</code> \u4f1a\u5728\u90e8\u5206\u6d88\u606f\u4e2d\u9644\u5e26\u7528\u4e8e\u5e76\u884c\u5316\u7684\u989d\u5916\u4fe1\u606f\u3002\u8bbe\u7f6e\u4e3a <code class=\"literal\">on</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 2\uff1b\u8bbe\u7f6e\u4e3a <code class=\"literal\">parallel</code> \u9700\u8981\u6700\u4f4e\u534f\u8bae\u7248\u672c 4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\">two_phase</span></dt>\n<dd>\n<p lang=\"zh\">\u542f\u7528\u4e24\u9636\u6bb5\u4e8b\u52a1\u7684\u5e03\u5c14\u9009\u9879\uff0c\u8981\u6c42\u534f\u8bae\u7248\u672c\u81f3\u5c11\u4e3a 3\u3002</p>\n</dd>\n<dt><span class=\"term\">origin</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6309\u6765\u6e90\u53d1\u9001\u53d8\u66f4\u7684\u9009\u9879\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">none</code>\uff08\u4ec5\u53d1\u9001\u65e0\u6765\u6e90\u4fe1\u606f\u7684\u53d8\u66f4\uff09\u6216 <code class=\"literal\">any</code>\uff08\u65e0\u8bba\u6765\u6e90\u5747\u53d1\u9001\uff09\u3002\u8be5\u9009\u9879\u53ef\u7528\u4e8e\u907f\u514d\u590d\u5236\u8282\u70b9\u4e4b\u95f4\u5f62\u6210\u5faa\u73af\uff08\u540c\u4e00\u6570\u636e\u65e0\u9650\u590d\u5236\uff09\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES\">54.5.2. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5404\u79cd\u534f\u8bae\u6d88\u606f\u5c06\u5728\u540e\u7eed\u5c0f\u8282\u4e2d\u5206\u522b\u8ba8\u8bba\u3002\u6bcf\u79cd\u6d88\u606f\u7684\u5177\u4f53\u683c\u5f0f\u89c1<a class=\"xref\" href=\"/docs/18/protocol-logicalrep-message-formats.html\" title=\"54.9.\u00a0\u903b\u8f91\u590d\u5236\u6d88\u606f\u683c\u5f0f\">\u7b2c\u00a054.9\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u6240\u6709\u9876\u5c42\u534f\u8bae\u6d88\u606f\u90fd\u4ee5\u4e00\u4e2a\u6d88\u606f\u7c7b\u578b\u5b57\u8282\u5f00\u5934\u3002\u867d\u7136\u5b83\u901a\u5e38\u5199\u4f5c\u5b57\u7b26\u4ee3\u7801\uff0c\u4f46\u672c\u8d28\u4e0a\u5b83\u662f\u4e00\u4e2a\u4e0e\u4efb\u4f55\u5b57\u7b26\u7f16\u7801\u65e0\u5173\u7684\u6709\u7b26\u53f7\u5b57\u8282\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e\u6d41\u590d\u5236\u534f\u8bae\u672c\u8eab\u63d0\u4f9b\u4e86\u6d88\u606f\u957f\u5ea6\uff0c\u56e0\u6b64\u9876\u5c42\u534f\u8bae\u6d88\u606f\u65e0\u9700\u5728\u5176\u5934\u90e8\u5185\u5d4c\u957f\u5ea6\u5b57\u6bb5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"PROTOCOL-LOGICAL-MESSAGES-FLOW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW\">54.5.3. \u903b\u8f91\u590d\u5236\u534f\u8bae\u6d88\u606f\u6d41</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9664 <code class=\"literal\">START_REPLICATION</code> \u547d\u4ee4\u548c\u91cd\u653e\u8fdb\u5ea6\u6d88\u606f\u4e4b\u5916\uff0c\u6240\u6709\u4fe1\u606f\u6d41\u65b9\u5411\u90fd\u662f\u4ece\u540e\u7aef\u5230\u524d\u7aef\u3002</p>\n<p lang=\"zh\">\u903b\u8f91\u590d\u5236\u534f\u8bae\u6309\u4e8b\u52a1\u9010\u4e2a\u53d1\u9001\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4e00\u5bf9 Begin \u4e0e Commit \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u540c\u6837\uff0c\u4e00\u5bf9 Begin Prepare \u4e0e Prepare \u6d88\u606f\u4e4b\u95f4\u7684\u6240\u6709\u6d88\u606f\u4e5f\u5c5e\u4e8e\u540c\u4e00\u4e8b\u52a1\u3002\u5bf9\u4e8e\u5927\u578b\u8fdb\u884c\u4e2d\u4e8b\u52a1\uff0c\u5b83\u8fd8\u4f1a\u5728\u4e00\u5bf9 Stream Start \u4e0e Stream Stop \u6d88\u606f\u4e4b\u95f4\u53d1\u9001\u5176\u66f4\u6539\u3002\u8fd9\u7c7b\u4e8b\u52a1\u7684\u6700\u540e\u4e00\u4e2a\u6d41\u4f1a\u5305\u542b Stream Commit \u6216 Stream Abort \u6d88\u606f\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u53d1\u9001\u7684\u4e8b\u52a1\u90fd\u5305\u542b\u96f6\u6761\u6216\u591a\u6761 DML \u6d88\u606f\uff08Insert\u3001Update\u3001Delete\uff09\u3002\u5728\u7ea7\u8054\u914d\u7f6e\u4e2d\uff0c\u8fd8\u53ef\u80fd\u5305\u542b Origin \u6d88\u606f\u3002Origin \u6d88\u606f\u8868\u793a\u8be5\u4e8b\u52a1\u6e90\u81ea\u53e6\u4e00\u4e2a\u590d\u5236\u8282\u70b9\u3002\u7531\u4e8e\u903b\u8f91\u590d\u5236\u534f\u8bae\u4e2d\u7684\u590d\u5236\u8282\u70b9\u51e0\u4e4e\u53ef\u4ee5\u662f\u4efb\u4f55\u5b9e\u73b0\uff0c\u56e0\u6b64\u552f\u4e00\u7684\u6807\u8bc6\u7b26\u5c31\u662f\u590d\u5236\u6e90\u7684\u540d\u79f0\u3002\u4e0b\u6e38\u8d1f\u8d23\u6309\u9700\u5904\u7406\u8fd9\u4e00\u4fe1\u606f\uff08\u5982\u679c\u9700\u8981\u5904\u7406\uff09\u3002Origin \u6d88\u606f\u603b\u662f\u5728\u4e8b\u52a1\u4e2d\u7684\u4efb\u4f55 DML \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u3002</p>\n<p lang=\"zh\">\u6bcf\u6761 DML \u6d88\u606f\u90fd\u5305\u542b\u4e00\u4e2a\u5173\u7cfb OID\uff0c\u7528\u4e8e\u6807\u8bc6\u88ab\u64cd\u4f5c\u7684\u53d1\u5e03\u8005\u5173\u7cfb\u3002\u5728\u67d0\u4e2a\u5173\u7cfb OID \u7684\u7b2c\u4e00\u6761 DML \u6d88\u606f\u4e4b\u524d\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6761 Relation \u6d88\u606f\uff0c\u63cf\u8ff0\u8be5\u5173\u7cfb\u7684\u6a21\u5f0f\u3002\u4e4b\u540e\uff0c\u5982\u679c\u8be5\u5173\u7cfb\u7684\u5b9a\u4e49\u81ea\u4e0a\u6b21\u53d1\u9001 Relation \u6d88\u606f\u4ee5\u6765\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u5c31\u4f1a\u518d\u53d1\u9001\u4e00\u6761\u65b0\u7684 Relation \u6d88\u606f\u3002\uff08\u534f\u8bae\u5047\u5b9a\u5ba2\u6237\u7aef\u80fd\u591f\u7f13\u5b58\u6240\u9700\u5173\u7cfb\u7684\u5143\u6570\u636e\u3002\uff09</p>\n<p lang=\"zh\">Relation \u6d88\u606f\u901a\u8fc7 OID \u6807\u8bc6\u5217\u7c7b\u578b\u3002\u5bf9\u4e8e\u5185\u7f6e\u7c7b\u578b\uff0c\u5047\u5b9a\u5ba2\u6237\u7aef\u53ef\u4ee5\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b\u7684 OID\uff0c\u56e0\u6b64\u65e0\u9700\u989d\u5916\u6570\u636e\u3002\u5bf9\u4e8e\u975e\u5185\u7f6e\u7c7b\u578b OID\uff0c\u4f1a\u5728 Relation \u6d88\u606f\u4e4b\u524d\u53d1\u9001\u4e00\u6761 Type \u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u4e0e\u8be5 OID \u5173\u8054\u7684\u7c7b\u578b\u540d\u79f0\u3002\u56e0\u6b64\uff0c\u9700\u8981\u660e\u786e\u8bc6\u522b\u5173\u7cfb\u5217\u7c7b\u578b\u7684\u5ba2\u6237\u7aef\u5e94\u7f13\u5b58 Type \u6d88\u606f\u5185\u5bb9\uff0c\u5e76\u5148\u68c0\u67e5\u8be5\u7f13\u5b58\u4e2d\u662f\u5426\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u5e94\u7684\u7c7b\u578b OID\uff1b\u82e5\u6ca1\u6709\uff0c\u518d\u5728\u672c\u5730\u67e5\u627e\u8be5\u7c7b\u578b OID\u3002</p>\n</div>\n</div>", "manual_path": "/docs/18/protocol-logical-replication.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/datatype-numeric.html", "method": "same-major semantic node", "sha256": "3119f68768634c1b35c2d9fb65ecb989addbdf99d88064c8292f114cf3b2b79d", "language": "zh", "matched_nodes": ["#DATATYPE-NUMERIC/div[9]/p[21]/span[4]"]}, {"url": "/docs/18/protocol-logical-replication.html", "method": "same-major semantic node", "sha256": "2385ad8545298692f3b529efec690d261b9f6e3f751a471aec37549ef8596fc7", "language": "zh", "matched_nodes": ["#PROTOCOL-LOGICAL-REPLICATION/div[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[1]/dl[0]/dt[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[13]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[1]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[5]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[7]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/div[2]/dl[0]/dd[9]", "#PROTOCOL-LOGICAL-REPLICATION/div[5]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[6]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[1]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[4]", "#PROTOCOL-LOGICAL-REPLICATION/div[7]/p[5]", "#PROTOCOL-LOGICAL-REPLICATION/p[2]", "#PROTOCOL-LOGICAL-REPLICATION/p[3]", "#PROTOCOL-LOGICAL-REPLICATION/p[4]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "The built-in output plugin used by PostgreSQL logical replication.", "/versions/18/facts/0/label": "Interface family", "/versions/18/facts/0/value": "Logical-decoding output plugin", "/versions/18/facts/1/label": "Handler or routine", "/versions/18/facts/2/label": "Recorded callbacks", "/versions/18/tables/0/title": "Registered interface handlers", "/versions/18/tables/1/title": "Documented options", "/versions/18/tables/2/title": "Option names recognized by this plugin build", "/versions/18/related/0/label": "Logical decoding output interface", "/versions/18/related/1/label": "Existing extension catalogue identity", "/versions/18/related/2/label": "Logical Begin message", "/versions/18/related/3/label": "Logical Relation message", "/versions/18/related/4/label": "Logical tuple representation", "/versions/18/related/5/label": "Logical Stream Start message", "/versions/18/related/6/label": "Logical Prepare message", "/versions/18/sections/0/title": "Interface and capability boundaries", "/versions/18/sections/1/title": "Output and protocol boundaries", "/versions/18/sections/2/title": "Registered implementation in core source", "/versions/18/tables/2/caption": "Extracted from the option parser; names alone do not describe defaults, accepted values or protocol requirements.", "/versions/18/tables/1/rows/2/name": "binary", "/versions/18/tables/2/rows/0/name": "binary", "/versions/18/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/18/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/18/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/18/sections/1/paragraphs/0": "Callback presence and protocol versions are separate from client negotiation and enabled plugin options. Streaming and two-phase processing require the matching protocol and configuration.", "/versions/18/sections/1/paragraphs/1": "test_decoding is an example/test output format; pgoutput implements the logical-replication protocol. Their output contracts are not interchangeable.", "/versions/18/tables/0/rows/0/feature": "Begin transaction", "/versions/18/tables/0/rows/1/feature": "Row changes", "/versions/18/tables/0/rows/4/feature": "Logical messages", "/versions/18/tables/0/rows/5/feature": "Start streamed transaction", "/versions/18/tables/0/rows/6/feature": "Stream row changes", "/versions/18/tables/0/rows/7/feature": "Prepare transaction", "/versions/18/tables/0/rows/8/feature": "Commit prepared", "/versions/18/tables/0/rows/9/feature": "Rollback prepared", "/versions/18/tables/0/columns/0/label": "Interface operation", "/versions/18/tables/0/columns/1/label": "Source observation", "/versions/18/tables/0/columns/2/label": "Callback", "/versions/18/tables/0/columns/3/label": "Implementation", "/versions/18/tables/1/columns/0/label": "Option", "/versions/18/tables/1/columns/1/label": "Same-version definition", "/versions/18/tables/2/columns/0/label": "Source option name", "/versions/18/tables/1/rows/0/definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel.", "/versions/18/tables/1/rows/1/definition": "Comma-separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.", "/versions/18/tables/1/rows/2/definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust.", "/versions/18/tables/1/rows/3/definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message .", "/versions/18/tables/1/rows/4/definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value.", "/versions/18/tables/1/rows/5/definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on.", "/versions/18/tables/1/rows/6/definition": "Option to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "3884cfe044aa0be407a5f4d36f2f4041ad9dccc7c46ed1edc6e96374c7e8aec0"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "proto_version", "definition": "Protocol version. Currently versions 1 , 2 , 3 , and 4 are supported. A valid version is required. Version 2 is supported only for server version 14 and above, and it allows streaming of large in-progress transactions. Version 3 is supported only for server version 15 and above, and it allows streaming of two-phase commits. Version 4 is supported only for server version 16 and above, and it allows streams of large in-progress transactions to be applied in parallel."}, {"name": "publication_names", "definition": "Comma-separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required."}, {"name": "binary", "definition": "Boolean option to use binary transfer mode. Binary mode is faster than the text mode but slightly less robust."}, {"name": "messages", "definition": "Boolean option to enable sending the messages that are written by pg_logical_emit_message ."}, {"name": "streaming", "definition": "Option to enable streaming of in-progress transactions. Valid values are off (the default), on and parallel . The setting parallel enables sending extra information with some messages to be used for parallelization. Minimum protocol version 2 is required to turn it on . Minimum protocol version 4 is required for the parallel value."}, {"name": "two_phase", "definition": "Boolean option to enable two-phase transactions. Minimum protocol version 3 is required to turn it on."}, {"name": "origin", "definition": "Option to send changes by their origin. Possible values are none to only send the changes that have no origin associated, or any to send the changes regardless of their origin. This can be used to avoid loops (infinite replication of the same data) among replication nodes."}], "callbacks": {"begin_cb": "pgoutput_begin_txn", "change_cb": "pgoutput_change", "commit_cb": "pgoutput_commit_txn", "message_cb": "pgoutput_message", "prepare_cb": "pgoutput_prepare_txn", "startup_cb": "pgoutput_startup", "shutdown_cb": "pgoutput_shutdown", "truncate_cb": "pgoutput_truncate", "stream_stop_cb": "pgoutput_stream_stop", "stream_abort_cb": "pgoutput_stream_abort", "stream_start_cb": "pgoutput_stream_start", "begin_prepare_cb": "pgoutput_begin_prepare_txn", "stream_change_cb": "pgoutput_change", "stream_commit_cb": "pgoutput_stream_commit", "stream_message_cb": "pgoutput_message", "stream_prepare_cb": "pgoutput_stream_prepare_txn", "commit_prepared_cb": "pgoutput_commit_prepared_txn", "stream_truncate_cb": "pgoutput_truncate", "filter_by_origin_cb": "pgoutput_origin_filter", "rollback_prepared_cb": "pgoutput_rollback_prepared_txn"}, "source_options": ["binary", "messages", "origin", "proto_version", "publication_names", "streaming", "two_phase"], "protocol_versions": {"LOGICALREP_PROTO_VERSION_NUM": "1", "LOGICALREP_PROTO_MIN_VERSION_NUM": "1", "LOGICALREP_PROTO_STREAM_VERSION_NUM": "2", "LOGICALREP_PROTO_TWOPHASE_VERSION_NUM": "3", "LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM": "4"}}, "comparison_hash": "825d73cfabb72ac9c0d2de837bc79ea972bb82f3c010a3833852f3f7e9e3935a", "manual_language": "zh", "runtime_verified": false}, "comparison": {"left": "11", "right": "12", "status": "changed", "diff": "--- PostgreSQL 11\n+++ PostgreSQL 12\n@@ -10,11 +10,11 @@\n   },\n   \"options\": [\n     {\n-      \"definition\": \"Protocol version. Currently only version 1 is supported.\",\n+      \"definition\": \"Protocol version. Currently only version 1 is supported. A valid version is required.\",\n       \"name\": \"proto_version\"\n     },\n     {\n-      \"definition\": \"Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed.\",\n+      \"definition\": \"Comma separated list of publication names for which to subscribe (receive changes). The individual publication names are treated as standard objects names and can be quoted the same as needed. At least one publication name is required.\",\n       \"name\": \"publication_names\"\n     }\n   ],"}}