Creating a hot standby for Postgresql
Your Postgresql standby will need two machines that are the same architecture, for example 64 bit with the same version of Postgres installed, including same Postgres architecture.
1. On Master – In pgAdmin run:
2. On Master – In pgAdmin, edit the postgresql.conf and set the following:
3. On Master – In pgAdmin, edit the pg_hba.conf and set the following where 18.104.22.168 is the ip address of the slave:
4. On Master – restart the postgres windows service.
5. On Slave – stop the postgres windows service.
6. On Slave – open a command prompt and cd to your Postgres directory:
(c:\program files\Postgresql\9.4) and run:
7. On Slave – open a command prompt and cd to your Postgres directory:
(c:\program files\Postgresql\9.4) and run where 22.214.171.124 is the ip of the Master:
8. On slave – In pgAdmin, edit the postgresql.conf and set the following:
9. On slave – create a text file:
(c:\program files\Postgresql\9.4\data\recovery.conf) with the following contents where 126.96.36.199 is the ip of the Master:
10. On Slave – start the postgres windows service.
Master and Slave should now be in sync. Update Master DB and confirm that the Slave is updated as well.
This amazing tip was provided by the mad scientist at DeployHub.
- Blueprint your application’s logical view
- Publish and Catalog Microservices
- Version Microservice Configurations
- Release and Track Microservices
- Manage Database Deployments
- Microservice Configuration Management Blogs
- What is Configuration Management?
- How to Navigate the Deathstar
- Working with Helm for your Microservices Releases
- On Versioning your Container Content
- Versioning Lambda Functions
- How to Use a Domain Driven Design
- Versioning Applications
- Why we need Application Packages for CD
- Agentless Deployments with DeployHub’s Engine
- Version Jumps and Tracking
- How are Microservices and Applications Related?