Configuration of django with master slave replication Postgres

From: soumitra bhandary <soumitra(dot)bhandary(at)hotmail(dot)com>
To: "shreeyansh2014(at)gmail(dot)com" <shreeyansh2014(at)gmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Configuration of django with master slave replication Postgres
Date: 2019-04-02 11:50:25
Message-ID: MA1PR01MB3548E88AC81FF8E528229AFFE0560@MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Hi
Does anyone have any idea with django how to configure multiple dsn that will automatically switch to new Postgres master host in case of failover happens to previous master and auto promotion of new master is done with repmgr.

My configuration is as below

Master and asynchronous slave node . Repmgrd is configured to take care of autofailover and promotion of new master node.

But from application side with django how to make datasource so that it automatically switches to new master node in case of failover.
Please share the steps.

Sent from my iPhone

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Shreeyansh Dba 2019-04-02 12:21:38 Re: trying to analyze deadlock
Previous Message Ramón Bastidas 2019-04-02 04:49:31 Re: LIMIT OFFSET with DB view vs plain SQL