jackc / pglogrepl

PostgreSQL logical replication library for Go.
MIT License
336 stars 63 forks source link

Add support for logical decoding messages #52

Closed catkins closed 1 year ago

catkins commented 1 year ago

This PR adds support for the logical decoding message type, as published by pg_logical_emit_message.

I followed the spec here: https://www.postgresql.org/docs/devel/protocol-logicalrep-message-formats.html

Example message:

select pg_logical_emit_message(false, 'context', '{ "x": 124 }');

The motivation here is ultimately to support use-cases similar to those described in this post: https://www.infoq.com/articles/wonders-of-postgres-logical-decoding-messages/

catkins commented 1 year ago

👋 Hi folks! Sorry I think I'd messed up my Github email settings and the responses ended up in a black hole.... I'll address the feedback now

catkins commented 1 year ago

@jackc @diabloneo I renamed the message type and reordered the message types, let me know if there's anything else I can do

@masterkidan thanks for trying to move this along ❤️

jackc commented 1 year ago

Thanks everyone!