I have a 2 node PostgreSQL 13.4 HA setup. I have kept the archive_mode=on. With this configuration the wal files are moved from pg_wal dir to archive directory. Also, I am using streaming replication for syncing the master and standby nodes.

I want to understand if a wal file is moved from pg_wal directory to the archive directory, without being replicated to the slave server (maybe due to the high creation rate of the wal files by postgres), would postgres be still able to replicate them to standby or I need to tweak my postgresql.conf to accommodate sufficient wal files in the pg_wal before shipping them to the archive directory.

Source link