{"Entry":{"collection":"guc","key":"output_plugin_libraries","name":"output_plugin_libraries","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Replication / Sending Servers","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"13","status":"added","to":"14"}],"content_hash":"2a626b35b0cbb5668d484332f969ef62acfaf963635d2a0186c7ebf4fed3e2dc","context":"","default_changed_in":[],"default_history":[{"from":"14","to":"19","value":"pgoutput, test_decoding"}],"derived_content_hash":"3235d88454191b3c8c8a747c9d18f254262cc82af7db1542154f9ab7f24a4f82","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:fc22a3604f909c1b2185e1a6082234de73f15a7683d102c5351c8387470806e8","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"olap":"ETL decoding plugins are still in-process code; do not use broad paths for convenience. Test large-transaction memory, WAL retention, and plugin output.","oltp":"List only installed, audited output plugins with a real consumer. Test with a least-privilege replication role and include plugin upgrades in the server release process.","small":"Keep the small built-in allowlist without logical decoding. Before adding wal2json or another plugin, establish package provenance, version compatibility, and maintenance ownership."},"mechanism":["Lists libraries that may be named as logical decoding output plugins. A superuser or a role granted SET privilege can change it for the relevant session or configuration scope.","Logical decoding accepts only output-plugin library names on this server-side allowlist, using LOAD-style naming with an exact plugin-name match. Adding a library is a trust decision because plugin code executes inside the server process.","Monitor and change output_plugin_libraries together with wal_level, max_wal_senders, max_replication_slots. Validate on the relevant server role and real workload, then use its superuser context to choose session change, reload, or restart; a historical boot default is not the current effective value."],"pitfalls":["Changing it on the wrong primary, standby, sender, or subscriber role.","Watching only configured bytes/time instead of actual lag, slot position, and worker state.","Failing over to a node that lacks the old primary's capacity or prerequisites.","Using infinite waits or WAL retention to hide a failed consumer."],"references":[{"title":"PostgreSQL 19 Beta 4: output_plugin_libraries","url":"https://www.postgresql.org/docs/19/runtime-config-replication.html#GUC-OUTPUT-PLUGIN-LIBRARIES"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["wal_level","max_wal_senders","max_replication_slots","archive_mode","wal_log_hints","shared_preload_libraries"],"summary":"output_plugin_libraries lists libraries that may be named as logical decoding output plugins. It is a superuser setting present in PG14–18; the latest recorded boot default is pgoutput, test_decoding."},"enumvals":[],"first_version":"14","group":"Replication","group_slug":"replication","imported_at":"2026-09-27T17:57:31.806043+08:00","intro_commit":{"authored_at":"2026-08-10T06:38:36-07:00","discussion":[],"hash":"bf3842a64f5df489fab31b82aaeb9067ac938fde","subject":"Add an output_plugin_libraries GUC to bless trusted output plugins","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=bf3842a64f5df489fab31b82aaeb9067ac938fde"},"key":"output_plugin_libraries","last_version":"20","max_val":"","min_val":"","name":"output_plugin_libraries","position":305,"present_in":["14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:28cee2fac0b626e9429665f078b824188537ef4462f8c405295cb15621848f04","receipt_sha256":"138ffb5c0b500dceed5d1d773d2253f1f7576fd4ecbb96e86d2097ed73a3b1e7","repair":"wiki-repair-20261023"},"short_desc":"Lists the libraries installed in dynamic_library_path that are also trusted for use as logical output plugins by replication clients.","short_desc_zh":"","source_rev":"wiki-repair-20261023:fc22a3604f909c1b2185e1a6082234de73f15a7683d102c5351c8387470806e8","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"output_plugin_libraries","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"output_plugin_libraries","SourceRevision":"wiki-repair-20261023:fc22a3604f909c1b2185e1a6082234de73f15a7683d102c5351c8387470806e8","Facts":{"boot_val":"pgoutput, test_decoding","category":"Replication / Sending Servers","context":"superuser","description":"Lists the libraries installed in dynamic_library_path that are also trusted for use as logical output plugins by replication clients. Any logical decoding or replication requests for other libraries will be refused. All users are subject to this restriction. The default is 'pgoutput, test_decoding', which are the two logical output plugins included in the standard PostgreSQL distribution. (Table 19.2 documents the behavior of the system if they are removed from this list.) The format is a comma-separated list of library names, where each name is interpreted as for the LOAD command (but logical decoding clients must specify a plugin name that exactly matches an entry in the list, without variations in case or path structure). Whitespace between entries is ignored; surround a library name with double quotes if you need to include whitespace or commas in the name. It is the responsibility of the server administrator to ensure that libraries added to this list do not unintentionally give additional privileges to non-superusers when they are loaded into the server. Note When updating the server from a version that does not have the output_plugin_libraries parameter, the following query can help construct the list of plugins that are required by all persistent logical replication slots: SELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL; Review the list carefully for safety before adjusting output_plugin_libraries. The above query can only display plugins which were successfully added to replication slots at some point in the past. Newly refused requests will appear in the logs with a message similar to ERROR: library \"...\" may not be used as an output plugin DETAIL: The configuration parameter \"output_plugin_libraries\" (currently 'pgoutput, test_decoding') does not name this library as a trusted output plugin. HINT: If it is safe for all REPLICATION users to use this library as an output plugin, add it to \"output_plugin_libraries\" and reload the server configuration. Table 19.2. Plugins Allowed by DefaultPluginDescriptionpgoutput Core plugin for logical replication. Removing pgoutput from output_plugin_libraries will cause future subscription connections, and maintenance of the replication slots for subscriptions, to fail with an error. (Beware that existing replication tools may not degrade gracefully if the server is configured in this way.) test_decoding Decodes the WAL stream into a human-readable text representation. pg_recvlogical uses this plugin by default, so removing it from output_plugin_libraries will prevent the use of that utility unless a replacement plugin is installed and explicitly selected with --plugin.","description_zh":"列出安装在 dynamic_library_path 所指定位置中、同时也受信任、可供复制客户端用作逻辑输出插件的库。任何针对其他库的逻辑解码或复制请求都将被拒绝。所有用户都受此限制。默认值为 'pgoutput, test_decoding'，它们是标准 PostgreSQL 发行版中包含的两个逻辑输出插件。（表 19.2 说明了将它们从此列表中移除后系统的行为。） 其格式为以逗号分隔的库名称列表，每个名称的解释方式与 LOAD 命令相同（但逻辑解码客户端指定的插件名称必须与列表中的一个条目完全匹配，大小写或路径结构不得有变化）。条目之间的空白会被忽略；如果库名称中需要包含空白或逗号，请用双引号将其括起。 服务器管理员有责任确保，加载添加到此列表中的库时，不会无意中向非超级用户授予额外权限。 注意 从没有 output_plugin_libraries 参数的版本更新服务器时，以下查询可帮助构造所有持久逻辑复制槽所需的插件列表： SELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL; 调整 output_plugin_libraries 之前，请仔细审查该列表以确保安全。 上述查询只能显示过去某个时刻已成功添加到复制槽的插件。新近被拒绝的请求将以类似以下消息出现在日志中： ERROR: library \"...\" may not be used as an output plugin DETAIL: The configuration parameter \"output_plugin_libraries\" (currently 'pgoutput, test_decoding') does not name this library as a trusted output plugin. HINT: If it is safe for all REPLICATION users to use this library as an output plugin, add it to \"output_plugin_libraries\" and reload the server configuration. 表 19.2. 默认允许的插件插件描述pgoutput 用于逻辑复制的核心插件。从 output_plugin_libraries 中移除 pgoutput，会导致后续订阅连接和订阅复制槽的维护报错失败。（请注意，服务器采用这种配置时，现有复制工具可能无法妥善处理这种情况。） test_decoding 将 WAL 流解码为人类可读的文本表示。pg_recvlogical 默认使用此插件，因此从 output_plugin_libraries 中移除它后，该工具将无法使用，除非安装了替代插件，并通过 --plugin 显式选择该插件。","description_zh_html":"\u003cp\u003e\n         列出安装在 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH\"\u003edynamic_library_path\u003c/a\u003e 所指定位置中、同时也受信任、可供复制客户端用作逻辑输出插件的库。任何针对其他库的\u003ca class=\"link\" href=\"/zh/docs/18/logicaldecoding-example.html\" title=\"47.1. 逻辑解码示例\"\u003e逻辑解码\u003c/a\u003e或\u003ca class=\"link\" href=\"/zh/docs/18/protocol-replication.html\" title=\"54.4. 流复制协议\"\u003e复制\u003c/a\u003e请求都将被拒绝。所有用户都受此限制。默认值为 \u003ccode class=\"literal\"\u003e'pgoutput, test_decoding'\u003c/code\u003e，它们是标准\n         \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 发行版中包含的两个逻辑输出插件。（\u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-replication.html#GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS\" title=\"表 19.2. 默认允许的插件\"\u003e表 19.2\u003c/a\u003e 说明了将它们从此列表中移除后系统的行为。）\n        \u003c/p\u003e\u003cp\u003e\n         其格式为以逗号分隔的库名称列表，每个名称的解释方式与\n         \u003ca class=\"link\" href=\"/zh/docs/18/sql-load.html\" title=\"LOAD\"\u003e\u003ccode class=\"command\"\u003eLOAD\u003c/code\u003e\u003c/a\u003e 命令相同（但逻辑解码客户端指定的插件名称必须与列表中的一个条目\u003cspan class=\"emphasis\"\u003e\u003cem\u003e完全\u003c/em\u003e\u003c/span\u003e匹配，大小写或路径结构不得有变化）。条目之间的空白会被忽略；如果库名称中需要包含空白或逗号，请用双引号将其括起。\n        \u003c/p\u003e\u003cp\u003e\n         服务器管理员有责任确保，加载添加到此列表中的库时，不会无意中向非超级用户授予额外权限。\n        \u003c/p\u003e\u003cdiv class=\"note\"\u003e\u003ch3 class=\"title\"\u003e注意\u003c/h3\u003e\u003cp\u003e\n          从没有 \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e 参数的版本更新服务器时，以下查询可帮助构造所有持久逻辑复制槽所需的插件列表：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nSELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL;\n\u003c/pre\u003e\u003cp\u003e\n          调整 \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e 之前，请仔细审查该列表以确保安全。\n         \u003c/p\u003e\u003cp\u003e\n          上述查询只能显示过去某个时刻已成功添加到复制槽的插件。新近被拒绝的请求将以类似以下消息出现在日志中：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nERROR:  library \"...\" may not be used as an output plugin\nDETAIL:  The configuration parameter \"output_plugin_libraries\" (currently 'pgoutput, test_decoding') does not name this library as a trusted output plugin.\nHINT:  If it is safe for all REPLICATION users to use this library as an output plugin, add it to \"output_plugin_libraries\" and reload the server configuration.\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/div\u003e\u003cdiv class=\"table\" id=\"GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS\"\u003e\u003cp class=\"title\"\u003e\u003cstrong\u003e表 19.2. 默认允许的插件\u003c/strong\u003e\u003c/p\u003e\u003cdiv class=\"table-contents\"\u003e\u003ctable border=\"1\" class=\"table\" summary=\"默认允许的插件\"\u003e\u003ccolgroup\u003e\u003ccol class=\"col1\"/\u003e\u003ccol class=\"col2\"/\u003e\u003c/colgroup\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003e插件\u003c/th\u003e\u003cth\u003e描述\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003ca class=\"link\" href=\"/zh/docs/18/protocol-logical-replication.html\" title=\"54.5. 逻辑流复制协议\"\u003epgoutput\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n             用于逻辑复制的核心插件。从 \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e 中移除 \u003ccode class=\"literal\"\u003epgoutput\u003c/code\u003e，会导致后续订阅连接和订阅复制槽的维护报错失败。（请注意，服务器采用这种配置时，现有复制工具可能无法妥善处理这种情况。）\n            \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca class=\"xref\" href=\"/zh/docs/18/test-decoding.html\" title=\"F.45. test_decoding — 用于 WAL 逻辑解码的基于 SQL 的测试/示例模块\"\u003etest_decoding\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n             将 WAL 流解码为人类可读的文本表示。\u003ca class=\"xref\" href=\"/zh/docs/18/app-pgrecvlogical.html\" title=\"pg_recvlogical\"\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_recvlogical\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e 默认使用此插件，因此从 \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e 中移除它后，该工具将无法使用，除非安装了替代插件，并通过 \u003ca class=\"link\" href=\"/zh/docs/18/app-pgrecvlogical.html#APP-PGRECVLOGICAL-OPTION-PLUGIN\"\u003e\u003ccode class=\"literal\"\u003e--plugin\u003c/code\u003e\u003c/a\u003e 显式选择该插件。\n            \u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/div\u003e\u003c/div\u003e\u003cbr class=\"table-break\"/\u003e","doc":{"anchor":"GUC-OUTPUT-PLUGIN-LIBRARIES","file":"runtime-config-replication.html","lang":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","slug":"18"},"doc_html":"\u003cp\u003e\n         Lists the libraries installed in \u003ca class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH\"\u003edynamic_library_path\u003c/a\u003e\n         that are also trusted for use as logical output plugins by replication\n         clients. Any \u003ca class=\"link\" href=\"/docs/18/logicaldecoding-example.html\" title=\"47.1. Logical Decoding Examples\"\u003elogical decoding\u003c/a\u003e\n         or \u003ca class=\"link\" href=\"/docs/18/protocol-replication.html\" title=\"54.4. Streaming Replication Protocol\"\u003ereplication\u003c/a\u003e requests for\n         other libraries will be refused. All users are subject to this\n         restriction. The default is \u003ccode class=\"literal\"\u003e'pgoutput, test_decoding'\u003c/code\u003e,\n         which are the two logical output plugins included in the standard\n         \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e distribution.\n         (\u003ca class=\"xref\" href=\"/docs/18/runtime-config-replication.html#GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS\" title=\"Table 19.2. Plugins Allowed by Default\"\u003eTable 19.2\u003c/a\u003e documents the\n         behavior of the system if they are removed from this list.)\n        \u003c/p\u003e\u003cp\u003e\n         The format is a comma-separated list of library names, where each name\n         is interpreted as for the \u003ca class=\"link\" href=\"/docs/18/sql-load.html\" title=\"LOAD\"\u003e\u003ccode class=\"command\"\u003eLOAD\u003c/code\u003e\u003c/a\u003e\n         command (but logical decoding clients must specify a plugin name that\n         \u003cspan class=\"emphasis\"\u003e\u003cem\u003eexactly\u003c/em\u003e\u003c/span\u003e matches an entry in the list, without\n         variations in case or path structure). Whitespace between entries is\n         ignored; surround a library name with double quotes if you need to\n         include whitespace or commas in the name.\n        \u003c/p\u003e\u003cp\u003e\n         It is the responsibility of the server administrator to ensure that\n         libraries added to this list do not unintentionally give additional\n         privileges to non-superusers when they are loaded into the server.\n        \u003c/p\u003e\u003cdiv class=\"note\"\u003e\u003ch3 class=\"title\"\u003eNote\u003c/h3\u003e\u003cp\u003e\n          When updating the server from a version that does not have the\n          \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e parameter, the following\n          query can help construct the list of plugins that are required by all\n          persistent logical replication slots:\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nSELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL;\n\u003c/pre\u003e\u003cp\u003e\n          Review the list carefully for safety before adjusting\n          \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e.\n         \u003c/p\u003e\u003cp\u003e\n          The above query can only display plugins which were successfully\n          added to replication slots at some point in the past. Newly refused\n          requests will appear in the logs with a message similar to\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nERROR:  library \"...\" may not be used as an output plugin\nDETAIL:  The configuration parameter \"output_plugin_libraries\" (currently 'pgoutput, test_decoding') does not name this library as a trusted output plugin.\nHINT:  If it is safe for all REPLICATION users to use this library as an output plugin, add it to \"output_plugin_libraries\" and reload the server configuration.\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/div\u003e\u003cdiv class=\"table\" id=\"GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS\"\u003e\u003cp class=\"title\"\u003e\u003cstrong\u003eTable 19.2. Plugins Allowed by Default\u003c/strong\u003e\u003c/p\u003e\u003cdiv class=\"table-contents\"\u003e\u003ctable border=\"1\" class=\"table\" summary=\"Plugins Allowed by Default\"\u003e\u003ccolgroup\u003e\u003ccol class=\"col1\"/\u003e\u003ccol class=\"col2\"/\u003e\u003c/colgroup\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003ePlugin\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003ca class=\"link\" href=\"/docs/18/protocol-logical-replication.html\" title=\"54.5. Logical Streaming Replication Protocol\"\u003epgoutput\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n             Core plugin for logical replication. Removing \u003ccode class=\"literal\"\u003epgoutput\u003c/code\u003e\n             from \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e will cause future\n             subscription connections, and maintenance of the replication slots\n             for subscriptions, to fail with an error. (Beware that existing\n             replication tools may not degrade gracefully if the server is\n             configured in this way.)\n            \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca class=\"xref\" href=\"/docs/18/test-decoding.html\" title=\"F.45. test_decoding — SQL-based test/example module for WAL logical decoding\"\u003etest_decoding\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n             Decodes the WAL stream into a human-readable text representation.\n             \u003ca class=\"xref\" href=\"/docs/18/app-pgrecvlogical.html\" title=\"pg_recvlogical\"\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_recvlogical\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e uses this plugin by default, so\n             removing it from \u003ccode class=\"literal\"\u003eoutput_plugin_libraries\u003c/code\u003e will\n             prevent the use of that utility unless a replacement plugin is\n             installed and explicitly selected with\n             \u003ca class=\"link\" href=\"/docs/18/app-pgrecvlogical.html#APP-PGRECVLOGICAL-OPTION-PLUGIN\"\u003e\u003ccode class=\"literal\"\u003e--plugin\u003c/code\u003e\u003c/a\u003e.\n            \u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/div\u003e\u003c/div\u003e\u003cbr class=\"table-break\"/\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","version":"18.7"},{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"83907b5f469e979a7b9ec875b5e7bdaa2ef6b85596ca31b45174f68cd7398b18","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":"Users with REPLICATION privileges may only use plugins in this list when creating logical replication slots.","lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"output_plugin_libraries","short_desc":"Lists libraries that may be named as logical decoding output plugins.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-replication.html","sha256":"52bd5892f7e5511d05f46fc0c13a017de85307c674a9014948eb4ad480326c15"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"string","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-OUTPUT-PLUGIN-LIBRARIES","file":"runtime-config-replication.html","lang":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"output_plugin_libraries","SourceDatabase":"center","Version":"18","Locale":"en","Title":"output_plugin_libraries","Summary":"Lists the libraries installed in dynamic_library_path that are also trusted for use as logical output plugins by replication clients. Any logical decoding or replication requests for other libraries will be refused. All users are subject to this restriction. The default is 'pgoutput, test_decoding', which are the two logical output plugins included in the standard PostgreSQL distribution. (Table 19.2 documents the behavior of the system if they are removed from this list.) The format is a comma-separated list of library names, where each name is interpreted as for the LOAD command (but logical decoding clients must specify a plugin name that exactly matches an entry in the list, without variations in case or path structure). Whitespace between entries is ignored; surround a library name with double quotes if you need to include whitespace or commas in the name. It is the responsibility of the server administrator to ensure that libraries added to this list do not unintentionally give additional privileges to non-superusers when they are loaded into the server. Note When updating the server from a version that does not have the output_plugin_libraries parameter, the following query can help construct the list of plugins that are required by all persistent logical replication slots: SELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL; Review the list carefully for safety before adjusting output_plugin_libraries. The above query can only display plugins which were successfully added to replication slots at some point in the past. Newly refused requests will appear in the logs with a message similar to ERROR: library \"...\" may not be used as an output plugin DETAIL: The configuration parameter \"output_plugin_libraries\" (currently 'pgoutput, test_decoding') does not name this library as a trusted output plugin. HINT: If it is safe for all REPLICATION users to use this library as an output plugin, add it to \"output_plugin_libraries\" and reload the server configuration. Table 19.2. Plugins Allowed by DefaultPluginDescriptionpgoutput Core plugin for logical replication. Removing pgoutput from output_plugin_libraries will cause future subscription connections, and maintenance of the replication slots for subscriptions, to fail with an error. (Beware that existing replication tools may not degrade gracefully if the server is configured in this way.) test_decoding Decodes the WAL stream into a human-readable text representation. pg_recvlogical uses this plugin by default, so removing it from output_plugin_libraries will prevent the use of that utility unless a replacement plugin is installed and explicitly selected with --plugin.","BodyHTML":"\u003cp\u003e\n         Lists the libraries installed in \u003ca href=\"/docs/18/runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH\" rel=\"nofollow\"\u003edynamic_library_path\u003c/a\u003e\n         that are also trusted for use as logical output plugins by replication\n         clients. Any \u003ca href=\"/docs/18/logicaldecoding-example.html\" rel=\"nofollow\"\u003elogical decoding\u003c/a\u003e\n         or \u003ca href=\"/docs/18/protocol-replication.html\" rel=\"nofollow\"\u003ereplication\u003c/a\u003e requests for\n         other libraries will be refused. All users are subject to this\n         restriction. The default is \u003ccode\u003e\u0026#39;pgoutput, test_decoding\u0026#39;\u003c/code\u003e,\n         which are the two logical output plugins included in the standard\n         \u003cspan\u003ePostgreSQL\u003c/span\u003e distribution.\n         (\u003ca href=\"/docs/18/runtime-config-replication.html#GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS\" rel=\"nofollow\"\u003eTable 19.2\u003c/a\u003e documents the\n         behavior of the system if they are removed from this list.)\n        \u003c/p\u003e\u003cp\u003e\n         The format is a comma-separated list of library names, where each name\n         is interpreted as for the \u003ca href=\"/docs/18/sql-load.html\" title=\"LOAD\" rel=\"nofollow\"\u003e\u003ccode\u003eLOAD\u003c/code\u003e\u003c/a\u003e\n         command (but logical decoding clients must specify a plugin name that\n         \u003cspan\u003e\u003cem\u003eexactly\u003c/em\u003e\u003c/span\u003e matches an entry in the list, without\n         variations in case or path structure). Whitespace between entries is\n         ignored; surround a library name with double quotes if you need to\n         include whitespace or commas in the name.\n        \u003c/p\u003e\u003cp\u003e\n         It is the responsibility of the server administrator to ensure that\n         libraries added to this list do not unintentionally give additional\n         privileges to non-superusers when they are loaded into the server.\n        \u003c/p\u003e\u003cdiv\u003e\u003ch3\u003eNote\u003c/h3\u003e\u003cp\u003e\n          When updating the server from a version that does not have the\n          \u003ccode\u003eoutput_plugin_libraries\u003c/code\u003e parameter, the following\n          query can help construct the list of plugins that are required by all\n          persistent logical replication slots:\n\u003c/p\u003e\u003cpre\u003e\nSELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL;\n\u003c/pre\u003e\u003cp\u003e\n          Review the list carefully for safety before adjusting\n          \u003ccode\u003eoutput_plugin_libraries\u003c/code\u003e.\n         \u003c/p\u003e\u003cp\u003e\n          The above query can only display plugins which were successfully\n          added to replication slots at some point in the past. Newly refused\n          requests will appear in the logs with a message similar to\n\u003c/p\u003e\u003cpre\u003e\nERROR:  library \u0026#34;...\u0026#34; may not be used as an output plugin\nDETAIL:  The configuration parameter \u0026#34;output_plugin_libraries\u0026#34; (currently \u0026#39;pgoutput, test_decoding\u0026#39;) does not name this library as a trusted output plugin.\nHINT:  If it is safe for all REPLICATION users to use this library as an output plugin, add it to \u0026#34;output_plugin_libraries\u0026#34; and reload the server configuration.\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS\"\u003e\u003cp\u003e\u003cstrong\u003eTable 19.2. Plugins Allowed by Default\u003c/strong\u003e\u003c/p\u003e\u003cdiv\u003e\u003ctable summary=\"Plugins Allowed by Default\"\u003e\u003ccolgroup\u003e\u003ccol/\u003e\u003ccol/\u003e\u003c/colgroup\u003e\u003cthead\u003e\u003ctr\u003e\u003cth\u003ePlugin\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"/docs/18/protocol-logical-replication.html\" rel=\"nofollow\"\u003epgoutput\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n             Core plugin for logical replication. Removing \u003ccode\u003epgoutput\u003c/code\u003e\n             from \u003ccode\u003eoutput_plugin_libraries\u003c/code\u003e will cause future\n             subscription connections, and maintenance of the replication slots\n             for subscriptions, to fail with an error. (Beware that existing\n             replication tools may not degrade gracefully if the server is\n             configured in this way.)\n            \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"/docs/18/test-decoding.html\" rel=\"nofollow\"\u003etest_decoding\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\n             Decodes the WAL stream into a human-readable text representation.\n             \u003ca href=\"/docs/18/app-pgrecvlogical.html\" title=\"pg_recvlogical\" rel=\"nofollow\"\u003e\u003cspan\u003e\u003cspan\u003epg_recvlogical\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e uses this plugin by default, so\n             removing it from \u003ccode\u003eoutput_plugin_libraries\u003c/code\u003e will\n             prevent the use of that utility unless a replacement plugin is\n             installed and explicitly selected with\n             \u003ca href=\"/docs/18/app-pgrecvlogical.html#APP-PGRECVLOGICAL-OPTION-PLUGIN\" rel=\"nofollow\"\u003e\u003ccode\u003e--plugin\u003c/code\u003e\u003c/a\u003e.\n            \u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/div\u003e\u003c/div\u003e\u003cbr/\u003e","SourceRevision":"wiki-repair-20261023:fc22a3604f909c1b2185e1a6082234de73f15a7683d102c5351c8387470806e8","ContentHash":"c864a43659269c26356cd936977c4a9fde3627de290d198ba4b82ae3c3997e45","Payload":{"description":"Lists the libraries installed in dynamic_library_path that are also trusted for use as logical output plugins by replication clients. Any logical decoding or replication requests for other libraries will be refused. All users are subject to this restriction. The default is 'pgoutput, test_decoding', which are the two logical output plugins included in the standard PostgreSQL distribution. (Table 19.2 documents the behavior of the system if they are removed from this list.) The format is a comma-separated list of library names, where each name is interpreted as for the LOAD command (but logical decoding clients must specify a plugin name that exactly matches an entry in the list, without variations in case or path structure). Whitespace between entries is ignored; surround a library name with double quotes if you need to include whitespace or commas in the name. It is the responsibility of the server administrator to ensure that libraries added to this list do not unintentionally give additional privileges to non-superusers when they are loaded into the server. Note When updating the server from a version that does not have the output_plugin_libraries parameter, the following query can help construct the list of plugins that are required by all persistent logical replication slots: SELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL; Review the list carefully for safety before adjusting output_plugin_libraries. The above query can only display plugins which were successfully added to replication slots at some point in the past. Newly refused requests will appear in the logs with a message similar to ERROR: library \"...\" may not be used as an output plugin DETAIL: The configuration parameter \"output_plugin_libraries\" (currently 'pgoutput, test_decoding') does not name this library as a trusted output plugin. HINT: If it is safe for all REPLICATION users to use this library as an output plugin, add it to \"output_plugin_libraries\" and reload the server configuration. Table 19.2. Plugins Allowed by DefaultPluginDescriptionpgoutput Core plugin for logical replication. Removing pgoutput from output_plugin_libraries will cause future subscription connections, and maintenance of the replication slots for subscriptions, to fail with an error. (Beware that existing replication tools may not degrade gracefully if the server is configured in this way.) test_decoding Decodes the WAL stream into a human-readable text representation. pg_recvlogical uses this plugin by default, so removing it from output_plugin_libraries will prevent the use of that utility unless a replacement plugin is installed and explicitly selected with --plugin."}},"RequestedLocale":"en","Fallback":false,"Versions":["14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
