URGENT Developer needed to create PowerShell script for failover of Postgres DBs BONUS for fast work

We have to set up PostgreSQL clustering and failover of the Master database to the Slave database.

What we are working with:

- 2 Windows servers, running on 2016

- PostgreSQL version 11 (clustering set up)

- On-prem installation (no internet connection)

We are setting up the production environment for on-prem Windows servers for a chatbot, using Botpress. The Botpress application uses Postgres as its internal database. We have 2 servers, each server has a Botpress application and a Postgres database.

A load balancer will spread the load between the two Botpress applications (on the 2 different servers). Both Botpress applications will be connected to the same Postgres database (Master). The Master database will be replicated on the Slave database. See diagram 1.

In case the Master Postgres database is down, both Botpress applications need to change to connect to the Salve Postgres database. See diagram 2. The Slave database should then become the Master.

We need a script using PowerShell that:

- Is implemented on both servers.

- Loops indefinitely and do a Write query to the current Master Postgres database, which checks if it is available.

- If the current Master database is down elect the Slave database using pg_ctl promote.

- Change the Botpress connection string in the config javascript file.

- Restart the Botpress service.

- The Slave database should then become the Master database

Skills: Windows Desktop, PostgreSQL

About the Employer:
( 0 reviews ) Hong Kong

Project ID: #21637182

3 freelancers are bidding on average $50/hour for this job


I am powershell expert and you can check my 5 star review for the same. For last 7 years i have been developing Blockchain, Decentralized Exchanges, Crypto Coins based on ERC20, Bitcoin Core, X11, IOTA, Dash, Minning P More

$50 USD / hour
(2 Reviews)

I am good in powershell, postgress sql stuff along with automation and development, please let me know if you are good to award this project to me

$50 USD / hour
(2 Reviews)

Hello, We are IT-Engineers and Business Analysts, creating complete web and mobile solutions, for already more than 15 years, supporting our products with custom digital marketing strategies and instruments. All More

$50 USD / hour
(0 Reviews)