0

I have the following subscription for logical replication:

pctest1=> SELECT subscription_name, status FROM pglogical.show_subscription_status();
          subscription_name          |   status
-------------------------------------+-------------
         sandbox_rds_pg10_subscriber | replicating
(1 row)

When I try to disable this, it returns the below error:

pctest1=>  alter SUBSCRIPTION sandbox_rds_pg10_subscriber disable;
ERROR:  subscription "sandbox_rds_pg10_subscriber" does not exist
0

I figured out that the below functions will work:

     pctest1=> select pglogical.alter_subscription_disable('sandbox_rds_pg10_subscriber');
-[ RECORD 1 ]--------------+--
alter_subscription_disable | t

pctest1=> select * from pglogical.show_subscription_status();
-[ RECORD 1 ]-----+------------------------------------------------------------------------------------------
subscription_name | sandbox_rds_pg10_subscriber
status            | disabled
provider_node     | sandbox_provider
provider_dsn      | host=10.xx.xx.xx port=xxxx dbname=sandbox_uat user=admin password=xxxxxxxxxx
slot_name         | pgl_pctest1_sand2c004cb_sand98307b9
replication_sets  | {default}
forward_origins   | {all}

pctest1=> select pglogical.alter_subscription_enable('sandbox_rds_pg10_subscriber');
-[ RECORD 1 ]-------------+--
alter_subscription_enable | t

pctest1=> select * from pglogical.show_subscription_status();
-[ RECORD 1 ]-----+------------------------------------------------------------------------------------------
subscription_name | sandbox_rds_pg10_subscriber
status            | replicating
provider_node     | sandbox_provider
provider_dsn      | host=10.x.x.x port=xxxx dbname=sandbox_uat user=admin password=xxxxxxxx
slot_name         | pgl_pctest1_sand2c004cb_sand98307b9
replication_sets  | {default}
forward_origins   | {all}


  • It would have been helpful if the question had mentioned that you are using a third-party replication tool. – Laurenz Albe Sep 16 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.