decoderbufs
decoderbufs : Logical decoding plugin that delivers WAL stream changes using a Protocol Buffer format
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 9650 | decoderbufs
|
decoderbufs
|
3.6.0 |
ETL
|
MIT
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--sL---
|
No
|
Yes
|
Yes
|
No
|
no
|
no
|
| Relationships | |
|---|---|
| See Also | pglogical
wal2json
decoder_raw
test_decoding
kafka_fdw
pglogical_origin
pglogical_ticker
pg_failover_slots
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG
|
3.6.0 |
18
17
16
15
14
|
decoderbufs |
- |
| RPM | PGDG
|
3.5.0 |
18
17
16
15
14
|
postgres-decoderbufs_$v |
- |
| DEB | PGDG
|
3.6.0 |
18
17
16
15
14
|
postgresql-$v-decoderbufs |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
el8.aarch64
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
el9.x86_64
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
el9.aarch64
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
el10.x86_64
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
el10.aarch64
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
PGDG 3.5.0
|
d12.x86_64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
d12.aarch64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
d13.x86_64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
d13.aarch64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
u22.x86_64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
u22.aarch64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
u24.x86_64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
u24.aarch64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
u26.x86_64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
u26.aarch64
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
PGDG 3.6.0
|
Source
Install
Make sure PGDG repo available:
pig repo add pgdg -u # add pgdg repo and update cacheInstall this extension with pig:
pig install decoderbufs; # install via package name, for the active PG version
pig install decoderbufs -v 18; # install for PG 18
pig install decoderbufs -v 17; # install for PG 17
pig install decoderbufs -v 16; # install for PG 16
pig install decoderbufs -v 15; # install for PG 15
pig install decoderbufs -v 14; # install for PG 14Config this extension to shared_preload_libraries:
shared_preload_libraries = 'decoderbufs';This extension does not need CREATE EXTENSION DDL command
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 = 4The 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.