How it works...
First, we need to ensure that the archive server at 10.0.30.20 can connect to the primary server to receive the transaction log traffic. Next, unlike other recipes that depend on archive_mode to be enabled on the primary server, we want to disable it this time. We are going to rely on pg_receivewal instead.
One setting that we change might seem a bit odd at first. The wal_keep_segments parameter defines how many transaction logs PostgreSQL should keep after it no longer needs them. Normally, it would delete old files or call the archive command to process them if archive_mode is on. By setting it to 1000, we are telling it to always have at least 1,000 extra files. This helps to avoid lost WAL archives if there's a network ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access