February 2020
Intermediate to advanced
734 pages
38h 13m
English
Starting with PostgreSQL 9.5, pg_receivewal is also fully compatible with synchronous replication. If we wanted to enable this capability, we could modify the final launch command to look something like this:
pg_receivewal -h 10.0.30.1 -U rep_user \
-D /db/pg_archived -v --synchronous \
&> /db/pg_archived/wal_archive.log &
Normally, pg_receivexlog only flushes to disk periodically. With the --synchronous parameter enabled, it will flush all transactions upon receipt, as well as sending an acknowledgment to the upstream primary. Now, we don't necessarily need a full copy of our database everywhere. Perhaps we could leverage this feature on a server that simply accumulates transaction logs in a secure location.
Being available ...
Read now
Unlock full access