gunnarmorling / pgoutput-cli

A command line client for consuming Postgres logical decoding events in the pgoutput format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pgoutput-cli

A command-line client for consuming logical replication events from Postgres, using the pgoutput logical decoding plug-in. As pgoutput emits a binary event format, messages are not really readable using pg_recvlogical or pg_logical_slot_get_changes(), as would be the case with text-based decoding plug-ins like wal2json or test_decoding.

All the heavy-lifting is done by pypgoutput by Daniel Geals; pgoutput-cli just wraps this in a ready-to use Python application and a container image.

Usage

pgoutput-cli --host=<host> --port=<port> \
  --database=<database> --user=<user> --password=<password> \
  --publication<publication> --slot=<slot>

Or, via Docker, typically connecting to a Docker network with your Postgres database:

docker run -it --rm --network <some network> gunnarmorling/pgoutput-cli \
  pgoutput-cli --host=<host> --port=<port> \
  --database=<database> --user=<user> --password=<password> \
  --publication<publication> --slot=<slot>

Build

docker build -t gunnarmorling/pgoutput-cli:<tag> .

Source

The source of this project is located in the pgoutput-cli repository on GitHub.

License

This software is provided under the MIT License (MIT).

About

A command line client for consuming Postgres logical decoding events in the pgoutput format

License:MIT License


Languages

Language:Python 87.5%Language:Dockerfile 12.5%