Some information about the cluster:
Version: postgres 9.5
Size: /postgres/data$ du -hs . 854G
OS: Ubuntu 14.04 LTS
Storage: Raid10 SSD's
I have a master-slave PostgreSQL 9.5 cluster running in a datacenter using standard postgres replication features (streaming replication and wal-shipping). My goal is to build a second "slave" server in our office to be able to reproduce bugs that occured in production. As postgres hot-standby slaves only support readonly queries, my approach would be to nightly recreate the slave and start it stand-alone with write access. The data from last night would be sufficient for 95% of the support tickets and I am fully aware that all changes to these databases made during the day would be lost.. ;)
As the cluster is quite large, I'm not sure what would be the best way to implement this.
I'm thinking about a cronjob running nightly on the office slave:
rsync postgres data directory from slave_live_datacenter to slave_lastnight_office
rsync wal files from slave_live_datacenter to slave_lastnight_office
start slave_lastnight_office (in live writable mode, not slave/recovery mode)
Would it be possible to skip the rsync part and only update
slave_lastnight_office to the state of last night with the newer wal and pitr? I guess not, as the changes during the day would make the replaying of the new wal impossible?