wal2json

Convert PostgreSQL WAL changes to JSON format for analysis

brewmacoslinux
Try with needOr install directly
Source

About

Convert PostgreSQL changesets to JSON format

Commands

wal2json

Examples

Install wal2json as a PostgreSQL extension$ CREATE EXTENSION wal2json;
Decode WAL records to JSON format using pg_logical_slot_get_changes$ SELECT * FROM pg_logical_slot_get_changes('slot_name', NULL, NULL, 'format-version', '2');
Stream logical replication changes in JSON format$ psql -d mydb -c "SELECT data FROM pg_logical_slot_peek_changes('my_slot', NULL, NULL);" | head -20