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

Update forward_origins for the existing subscription #452

Open
shreyasp opened this issue Dec 22, 2023 · 1 comment
Open

Update forward_origins for the existing subscription #452

shreyasp opened this issue Dec 22, 2023 · 1 comment

Comments

@shreyasp
Copy link

I have created a subscription to synchronise the data between a virtual machine and a GCP CloudSQL instance. Before we promote the CloudSQL instance to handle all the traffic, we want to establish bi-directional replication so the existing virtual machine instance can stay as a redundant backup or failover instance.

To set up the bi-directional replication, we need to set forward_origins to {} instead of the default {all}. I checked the existing documentation and found no method to update forward_origins for an existing subscription.

I would be thankful if you could point me out a workaround or method that can update the value for forward_origins in the case of an existing subscription.

Thanks,
Shreyas.

@greenbea
Copy link

greenbea commented Dec 29, 2023

I had the same issue. I solved it by disabling the subscription and updating the subscription table directly.

select * from pglogical.alter_subscription_disable('sub1, true);
update pglogical.subscription set sub_forward_origins = '{}' where sub_name = 'sub1';

I don't know how pglogical works under the hood, so I don't know if doing this is recommended in production.

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

2 participants