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

How to utilize publications with wal2json #164

Closed
flexzuu opened this issue Apr 29, 2020 · 2 comments
Closed

How to utilize publications with wal2json #164

flexzuu opened this issue Apr 29, 2020 · 2 comments
Labels

Comments

@flexzuu
Copy link

flexzuu commented Apr 29, 2020

Hey, i love the wal2json plugin.
We have a multi tenant db with a lot of schemas.
Sometimes we move tenants into the db with big transactions.
We use the format version 1 because in normal operations we only send small transaction that we need to process as one message.

We would like to avoid processing of the big transactions.
How we planned to do this is utilizing publications.
We planed to create a publication and only and tenants tables to this publications after the initial big transactions because we are only interested in the changes after the big initial transactions.

I could not get wal2json work with publications. Do you have any info on how to utilize this together?

@eulerto eulerto added the feature label May 3, 2020
@eulerto
Copy link
Owner

eulerto commented May 3, 2020

Publications was introduced in version 10 and wal2json is a little older than that (introduced in 9.4). Although wal2json doesn't use publications, you can use parameters add-tables and filter-tables to select specific tables in your database. You can also use parameter actions to select SQL commands you want to process. In summary, you can emulate a publication with those 3 parameters.

By the way, publication support (for version 10+) seems to be a nice feature.

@flexzuu
Copy link
Author

flexzuu commented May 4, 2020

@eulerto thanks for the quick answer. We worked around our issue by using the new format and filtering on our side so we can close this if you like.

By the way, publication support (for version 10+) seems to be a nice feature.

I agree it would be a nice feature. Especially because you can change what to filter for or at runtime. This would be a nice advantage over filter tables etc. As you can alter what tables a publication works on.

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

No branches or pull requests

2 participants