Force Reconnect of streaming replication - Mailing list pgsql-general

From Hannes Erven
Subject Force Reconnect of streaming replication
Date
Msg-id BF64066C-BA98-4526-B3E7-2B1F971FF2C6@erven.at
Whole thread Raw
List pgsql-general
Hi,


consider a PG10 master center, streaming via internet to another site. The receiving site has a fast primary uplink and
muchslower backup link. 

When the primary link goes down, all traffic is routed through the backup connection. The streaming replication's
connectiondrops and is automatically re-establish over the backup link. 

But when the primary link comes up again, the replication will still use the already established connection via the
slowbackup link. 


If I kill the wal_sender process on the master, the slave will immediately reconnect over the "best" available link.
But is this really the best way to force PG to re-connect the replication?

I guess I could as well kill the wal-receiving process on the slave but still I'm hesitating to put something like
"killallpg_walsender" in a cronjob... 


Is there a better way?


Thanks for your opinions,
best regards

-hannes


pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: 2018-11-28 10:40:01,906 9672 CRITICAL ? odoo.service.server:Failed to initialize database `abc`
Next
From: PegoraroF10
Date:
Subject: Primary Key index with Include