DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Replication / Sending Servers

output_plugin_libraries

Lists libraries that may be named as logical decoding output plugins. Users with REPLICATION privileges may only use plugins in this list when creating logical replication slots.

  • Default: pgoutput, test_decoding
  • Type: string
  • Applies: Session (superuser)

In plain words

Logical replication slots turn WAL into readable changes using an output plugin, a shared library loaded into the server. Users with the REPLICATION attribute can create such slots, so this list controls which libraries they are allowed to load. Anything not in the list is refused.

The default allows the built-in pgoutput (used by publications/subscriptions) and test_decoding.

For DBAs and operators

Entries are library names as you would give them to LOAD, comma-separated; quote names containing spaces or commas. A request must match an entry exactly (case and path form). Libraries are looked up in dynamic_library_path. Refusal:

ERROR: library "wal2json" may not be used as an 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.

This applies to every user, superusers included. The setting was added in the 18.6 minor release (and the matching minor releases of older branches); earlier releases accepted any library, so after an upgrade CDC tools (Debezium with decoderbufs, wal2json, pglogical, …) can start failing until the plugin is added. Find what existing slots use:

SELECT DISTINCT plugin FROM pg_replication_slots WHERE plugin IS NOT NULL;

Only list libraries you trust: a plugin runs inside the server with the server's privileges.

How to change it

A superuser (or a role granted SET) can change it per session with SET.

See it in context

Logical replication Replication slots

Related parameters

wal_level max_replication_slots dynamic_library_path

All Replication parameters