Thread: Shipping big WAL archives to hot standby

Shipping big WAL archives to hot standby

From
Jordi
Date:
I'm looking to extend my PostgreSQL 9.4 master with a few slaves in hot
standby read-only for load balancing.

The idea would be to update the slaves only at defined times (once every
24/48 hours) to avoid migration issues with the application server code
and also because the "freshness" of the slaves is not so important.

What would be the effect of suddenly introducing a 1-2 GB of WAL
archives to the WAL restore folder on the slave? Would there be a big
performance effect on the incoming queries to the slave? Would the slave
be available for queries while the WAL logs are restored into the DB?

Thanks
Jordi



Re: Shipping big WAL archives to hot standby

From
Venkata Balaji N
Date:

What would be the effect of suddenly introducing a 1-2 GB of WAL archives to the WAL restore folder on the slave? Would there be a big performance effect on the incoming queries to the slave? Would the slave be available for queries while the WAL logs are restored into the DB?

If the Queries are running on slave whilst WAL archives are being applied, there is a bright chance that, queries would encounter a conflict with the recovery and would eventually get cancelled. You can see messages in the PostgreSQL logfiles. The recommended approach would be to apply WALs when queries are being executed on slave.

Regards,
Venkata B N

Fujitsu Australia