Disable Streaming Replication without restarting either master or slave

I understand the way things work currently, but would it not be more
convenient to let the replication be stopped and started from SQL commands
like:

On Master:

select pg_pause_streaming_replication(slave_fqdn);
select pg_resume_streaming_replication(slave_fqdn);

On Slave:

select pg_pause_streaming_replication();
select pg_pause_streaming_replication();

If Cascaded Streaming Replication is confugured, then

On Slave:

select pg_start_streaming_replication(cascaded_slave_fqdn);
select pg_stop_streaming_replication(cascaded_slave_fqdn);

Or an OS executable [ either in the core or a contrib module] like

pg_replication -p primary_fqdn -s slave_fqdn -a pause
pg_replication -p primary_fqdn -s slave_fqdn -a resume
pg_replication -p primary_fqdn -s slave_fqdn -a setup

[ the last one would awesome; and i do not think that it is impossible, and
would be loved by one and all ]


Commentaires

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Translate »