You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was mentioned in a code review regarding PostgresAdmin that the .disable_replication method might make sense being moved into the pg-logical_replication gem. This issue is intended to discuss that topic.
The method in question (not committed to the project at the time of writing) is the following:
private_class_methoddefself.disable_replication(dbname)require'pg/logical_replication'with_pg_connectiondo |conn|
pglogical=PG::LogicalReplication::Client.new(conn)ifpglogical.subscriber?pglogical.subcriptions(dbname).eachdo |subscriber|
sub_id=subscriber["subscription_name"]beginpglogical.drop_subscription(sub_id,true)rescuePG::InternalError=>eraiseunlesse.message.include?("could not connect to publisher")raiseunlesse.message.match?(/replication slot .* does not exist/)pglogical.disable_subscription(sub_id).checkpglogical.alter_subscription_options(sub_id,"slot_name"=>"NONE")pglogical.drop_subscription(sub_id,true)endendelsifpglogical.publishes?('miq')pglogical.drop_publication('miq')endendend
I think some changes would be necessary to make it more generic, but this is the method in question.
The text was updated successfully, but these errors were encountered:
Fryguy
changed the title
Discussion: Push PostgresAdmin.disable_replication into pg-logical_replication
Push PostgresAdmin.disable_replication into pg-logical_replication
Jun 2, 2021
This issue has been automatically marked as stale because it has not been updated for at least 3 months.
If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
It was mentioned in a code review regarding
PostgresAdmin
that the.disable_replication
method might make sense being moved into thepg-logical_replication
gem. This issue is intended to discuss that topic.The method in question (not committed to the project at the time of writing) is the following:
I think some changes would be necessary to make it more generic, but this is the method in question.
The text was updated successfully, but these errors were encountered: