↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Configuration Parameters

output_plugin_libraries

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.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

boot val
pgoutput, test_decoding
category
Replication / Sending Servers
context
superuser
doc same as
Unknown
documented
true
enumvals
Unknown
extra desc
Users with REPLICATION privileges may only use plugins in this list when creating logical replication slots.
lang
en
max val
Unknown
metadata version
18
min val
Unknown
name
output_plugin_libraries
short desc
Lists libraries that may be named as logical decoding output plugins.
source
pg-settings-source-snapshot
unit
Unknown
vartype
string

Definition PG 18

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 Default

PluginDescription
pgoutput 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.

Compare versions

Complete source facts

doc html

<p>
         Lists the libraries installed in <a class="xref" href="/docs/18/runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH">dynamic_library_path</a>
         that are also trusted for use as logical output plugins by replication
         clients. Any <a class="link" href="/docs/18/logicaldecoding-example.html" title="47.1. Logical Decoding Examples">logical decoding</a>
         or <a class="link" href="/docs/18/protocol-replication.html" title="54.4. Streaming Replication Protocol">replication</a> requests for
         other libraries will be refused. All users are subject to this
         restriction. The default is <code class="literal">'pgoutput, test_decoding'</code>,
         which are the two logical output plugins included in the standard
         <span class="productname">PostgreSQL</span> distribution.
         (<a class="xref" href="/docs/18/runtime-config-replication.html#GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS" title="Table 19.2. Plugins Allowed by Default">Table 19.2</a> documents the
         behavior of the system if they are removed from this list.)
        </p><p>
         The format is a comma-separated list of library names, where each name
         is interpreted as for the <a class="link" href="/docs/18/sql-load.html" title="LOAD"><code class="command">LOAD</code></a>
         command (but logical decoding clients must specify a plugin name that
         <span class="emphasis"><em>exactly</em></span> 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.
        </p><p>
         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.
        </p><div class="note"><h3 class="title">Note</h3><p>
          When updating the server from a version that does not have the
          <code class="literal">output_plugin_libraries</code> parameter, the following
          query can help construct the list of plugins that are required by all
          persistent logical replication slots:
</p><pre class="programlisting">
SELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL;
</pre><p>
          Review the list carefully for safety before adjusting
          <code class="literal">output_plugin_libraries</code>.
         </p><p>
          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
</p><pre class="programlisting">
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.
</pre><p>
</p></div><div class="table" id="GUC-OUTPUT-PLUGIN-LIBRARIES-BUILTINS"><p class="title"><strong>Table 19.2. Plugins Allowed by Default</strong></p><div class="table-contents"><table border="1" class="table" summary="Plugins Allowed by Default"><colgroup><col class="col1"/><col class="col2"/></colgroup><thead><tr><th>Plugin</th><th>Description</th></tr></thead><tbody><tr><td><a class="link" href="/docs/18/protocol-logical-replication.html" title="54.5. Logical Streaming Replication Protocol">pgoutput</a></td><td>
             Core plugin for logical replication. Removing <code class="literal">pgoutput</code>
             from <code class="literal">output_plugin_libraries</code> 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.)
            </td></tr><tr><td><a class="xref" href="/docs/18/test-decoding.html" title="F.45. test_decoding — SQL-based test/example module for WAL logical decoding">test_decoding</a></td><td>
             Decodes the WAL stream into a human-readable text representation.
             <a class="xref" href="/docs/18/app-pgrecvlogical.html" title="pg_recvlogical"><span class="refentrytitle"><span class="application">pg_recvlogical</span></span></a> uses this plugin by default, so
             removing it from <code class="literal">output_plugin_libraries</code> will
             prevent the use of that utility unless a replacement plugin is
             installed and explicitly selected with
             <a class="link" href="/docs/18/app-pgrecvlogical.html#APP-PGRECVLOGICAL-OPTION-PLUGIN"><code class="literal">--plugin</code></a>.
            </td></tr></tbody></table></div></div><br class="table-break"/>

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"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:fc22a3604f909c1b2185e1a6082234de73f15a7683d102c5351c8387470806e8

Text language: en · wiki-repair-20261023:fc22a3604f909c1b2185e1a6082234de73f15a7683d102c5351c8387470806e8