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.
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>
docker build -t gunnarmorling/pgoutput-cli:<tag> .
The source of this project is located in the pgoutput-cli repository on GitHub.
This software is provided under the MIT License (MIT).