[SOLVED] Modification of wal_receiver_timeout and wal_sender_timeout

Issue

This Content is from Stack Overflow. Question asked by Fabrice Chapuis

What is the potential impact on physical replication in asynchronous streaming mode if we change the parameters wal_receiver_timeout and wal_sender_timeout as follows:

wal_receiver_timeout: default value 1min to new value 60min
wal_sender_timeout: default value 1min to new value 60min

Can the RPO be increased by that modification?



Solution

If the TCP connection for streaming vanishes without being properly closed (FIN), then it will take up to the timeout values before your PostgreSQL systems notice and re-establish the connection. Until the receiver times-out, the replica won’t try to re-establish the connection. And until the sender times-out, the master won’t accept the new connection because the slot is thought to be already in use.

This could violate your RPO, depending on what your RPO is, and what other means you might have to minimize data loss (other replicas, log shipping).


This Question was asked in StackOverflow by Fabrice Chapuis and Answered by jjanes It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?