'Stop and Resume pglogical Replication -PostgreSQL 12

I wanted to check if there is a way to stop and resume PostgreSQL replication using pglogical? For some reason, if either the publisher or subscriber needs to restart and go offline for sometime (or connectivity issues because of some n/w issues), is there a way to stop the replication and resume it again? I know it is not a relevant example but AWS DMS (which used Postgres native logical replication) gives you an option to stop/resume the replication. Wanted to check if there is a similar option available in pglogical.

Thanks



Solution 1:[1]

Sure there is. I presume You have pglogical extension installed and there is standard logical replication:

select pglogical.alter_subscription_disable('subscription_name');

You can use a WHERE clause to aim it specifically:

select pglogical.alter_subscription_disable(subscription_name) from pglogical.subscriptions where writer = 'name_of_writer';

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ?obo