Fabrice Chapuis
Fabrice Chapuis

Reputation: 498

Modification of wal_receiver_timeout and wal_sender_timeout

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?

Upvotes: 0

Views: 945

Answers (1)

jjanes
jjanes

Reputation: 44137

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).

Upvotes: 1

Related Questions