decoderbufs
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
decoderbufs | 3.6.0 | ETL | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9650 | decoderbufs | No | Yes | Yes | No | No | No | - |
| Related | pglogical wal2json decoder_raw test_decoding kafka_fdw pglogical_origin pglogical_ticker pg_failover_slots |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 3.6.0 | 1817161514 | decoderbufs | - |
| RPM | PGDG | 3.5.0 | 1817161514 | postgres-decoderbufs_$v | - |
| DEB | PGDG | 3.6.0 | 1817161514 | postgresql-$v-decoderbufs | - |
Install
You can install decoderbufs directly. First, make sure the PGDG repository is added and enabled:
pig repo add pgdg -u # Add PGDG repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install decoderbufs; # Install for current active PG version
pig ext install -y decoderbufs -v 18 # PG 18
pig ext install -y decoderbufs -v 17 # PG 17
pig ext install -y decoderbufs -v 16 # PG 16
pig ext install -y decoderbufs -v 15 # PG 15
pig ext install -y decoderbufs -v 14 # PG 14
dnf install -y postgres-decoderbufs_18 # PG 18
dnf install -y postgres-decoderbufs_17 # PG 17
dnf install -y postgres-decoderbufs_16 # PG 16
dnf install -y postgres-decoderbufs_15 # PG 15
dnf install -y postgres-decoderbufs_14 # PG 14
apt install -y postgresql-18-decoderbufs # PG 18
apt install -y postgresql-17-decoderbufs # PG 17
apt install -y postgresql-16-decoderbufs # PG 16
apt install -y postgresql-15-decoderbufs # PG 15
apt install -y postgresql-14-decoderbufs # PG 14
Preload:
shared_preload_libraries = 'decoderbufs';
Usage
Sources:
decoderbufs is a headless PostgreSQL logical-decoding output plugin used by the Debezium PostgreSQL connector. It turns WAL changes into Protocol Buffers messages; it does not create a user SQL schema and does not require CREATE EXTENSION.
Configure PostgreSQL
Enable the plugin and logical replication in postgresql.conf, size the sender and slot limits for the expected consumers, then restart PostgreSQL:
shared_preload_libraries = 'decoderbufs'
wal_level = logical
max_wal_senders = 8
max_replication_slots = 4
The replication login also needs the REPLICATION attribute and a matching pg_hba.conf rule. Use authentication appropriate for the network rather than the README’s local demonstration settings.
Core Workflow
Create a logical slot whose output plugin is decoderbufs:
SELECT *
FROM pg_create_logical_replication_slot('decoderbufs_demo', 'decoderbufs');
For inspection in psql, ask the plugin for debug text:
SELECT data
FROM pg_logical_slot_peek_changes(
'decoderbufs_demo', NULL, NULL, 'debug-mode', '1'
);
SELECT data
FROM pg_logical_slot_get_changes(
'decoderbufs_demo', NULL, NULL, 'debug-mode', '1'
);
peek leaves the confirmed position unchanged; get advances it. Normal Debezium operation consumes the binary messages defined by pg_logicaldec.proto rather than enabling debug mode.
Important Objects and Boundaries
decoderbufsis the logical-decoding output-plugin name passed when a slot is created.debug-mode = 1provides human-readable output for troubleshooting only.- The Protobuf message carries transaction metadata, relation and column information, operation kind, old keys, and typed values.
- Tables that must emit sufficient data for
UPDATEandDELETErequire an appropriateREPLICA IDENTITY.
Logical slots retain WAL until a consumer confirms progress. Monitor pg_replication_slots and remove abandoned slots deliberately to prevent disk exhaustion. Schema changes, replica identity, unsupported data-type mappings, and large transactions should be tested with the matching Debezium connector version.
The upstream build requires PostgreSQL 9.6 or newer and protobuf-c; PostGIS support is compiled when available. The package release moves with Debezium to 3.6.0.Final, while the plugin control metadata remains SQL version 0.1.0 because this is an output plugin rather than a migration-based SQL extension.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.