Thread: Auto-build testing environment, 8.4, warm standby

Auto-build testing environment, 8.4, warm standby

From
Jiří Hlinka
Date:
Hello,

I'd like to setup a testing environment which is based on a current production server status. The DB server is pgsql 8.4 (subscribed RHEL, so can't use hot standby or other 9.0+ options). The objective is to have a db server that I could clone many times a day to auto-build many testing environments and not to use the production server for this purpose (which is not virtualized).

My idea is to build a warm standby server that will be almost up-to-date according to the production server via WAL shipping (there is no need to have a realtime-exact copy of the production, just to have lets say up-today data on a standby server). Every time I'd like to create a new testing environment I'll:

1. clone the warm standby server (=vm guest clone)
2. change some settings of the new clone (IP, postgresql settings from warm-standby to "normal" setup)
3. done :-), testing environment is completed (together with same application servers)

Is this good/best solution, does it have any caveats? Do you have better solution?

Thanks for comments,
Jiri