Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logical decoding / streaming replication #19

Open
kosta opened this issue Jan 29, 2019 · 5 comments
Open

logical decoding / streaming replication #19

kosta opened this issue Jan 29, 2019 · 5 comments

Comments

@kosta
Copy link

kosta commented Jan 29, 2019

Do you consider Logical Decoding / Streaming Replication a goal of this library? I'm not 100% sure yet, but I might try a stab of implementing something similar as wal2json in rust. Would you be interested in a PR to add the necessary interface definitions etc. and maybe an example?

@bluejekyll
Copy link
Owner

Yes, that would be very cool.

I don’t have any strict plans for this library other than making it easy to build Postgres extensions in Rust.

There’s still a lot of conversion routines etc to build, so you may have a lot of work to achieve this.

@kosta
Copy link
Author

kosta commented Mar 6, 2019

I found this today, haven't looked into it besides reading the readme, but it seems like this might be exactly that use case? https://github.com/instructure/jsoncdc

@bluejekyll
Copy link
Owner

looks that way. It looks like they're building directly on top of the FFI, rather than trying to use generic wrappers like pg-extend-rs is exporting. I didn't find rgffi when I started this project, so that's interesting, I'm not sure how that deals with targeting multiple pg versions.

@felippemr
Copy link

Hey @bluejekyll, would you be able to provide some guidance on how would I start implementing(https://www.postgresql.org/docs/11/logicaldecoding-output-plugin.html) using this lib?

@bluejekyll
Copy link
Owner

It looks like we need a way to define _PG_output_plugin_init similar to how we do pg_magic macro.

In addition to that, it looks like a lot of C ffi functions would be declared for the callbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants