Thread: Logical replication from multiple masters - master starvation

Logical replication from multiple masters - master starvation

From
Dan shmidt
Date:
Hi everyone,

I'm using postgres 11.4
I have a configuration in which there's one subscriber (slave) node which subscribes to several (4) publisher nodes (master).
I noticed one of the master servers keeps lagging behind. I noticed that the replication worker on the master keeps failing on timeouts. 
When querying pg_stat_subscription on the slave I noticed that last_msg_send_time for this master hardly ever updates. 

Could this be starvation? 
Is there any special configuration on either side (master/slave) that can help reduce that?
What's the logic on the slave that chooses from which subscription to process incoming data?
How can I further debug this?

Thanks,
Dan.

Sent from Outlook