From: soumitra bhandary <soumitra.bhandary@hotmail.com>
To: Prince Pathria <prince.pathria@goevive.com>
Cc: Thomas Poty <thomas.poty@gmail.com>
Cc: shreeyansh2014@gmail.com <shreeyansh2014@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Configuration of django with master slave replication Postgres
Date: Wed, 3 Apr 2019 00:17:05 +0000
Message-ID: <MA1PR01MB3548DF05AD5B600B7386EBFCE0570@MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAON0DazH5uOOu+YwKGhr7M0hMGdStb+9gky4Fg9X1Mu0atRJsw@mail.gmail.com>
References: <MA1PR01MB3548E88AC81FF8E528229AFFE0560@MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM>
<CAN_ctnivSuXmBjKHaJyn_iOrTioDcFZnRnYLMU1zg1rEm3CAPw@mail.gmail.com>
<CAON0DazH5uOOu+YwKGhr7M0hMGdStb+9gky4Fg9X1Mu0atRJsw@mail.gmail.com>
Hi Prince,
Can you please share me the steps to set up pgpool. Also if I use single pgpool that could led to the single point failure. Even for that reason in django I have to configure dsn like that so that it can automatically switch to other node if one node is not reachable. How to do that??
Sent from my iPhone
On 03-Apr-2019, at 2:10 AM, Prince Pathria <prince.pathria@goevive.com<mailto:prince.pathria@goevive.com>> wrote:
PgPool-II is very much suitable for your case. It will distribute your read queries on master and slaves + automatic master switch detection + connection pools.
Happy to help :)
Prince Pathria Systems Engineer Evive +91 9478670472 goevive.com<http://goevive.com;
On Tue, Apr 2, 2019 at 5:52 PM Thomas Poty <thomas.poty@gmail.com<mailto:thomas.poty@gmail.com>> wrote:
As you are using pg 9.5, these links may help :
https://severalnines.com/blog/postgresql-load-balancing-using-haproxy-keepalivedhttps://clusterlabs.github.io/PAF/
Le mar. 2 avr. 2019 à 13:50, soumitra bhandary <soumitra.bhandary@hotmail.com<mailto:soumitra.bhandary@hotmail.com>> a écrit :
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: soumitra.bhandary@hotmail.com, prince.pathria@goevive.com, thomas.poty@gmail.com, shreeyansh2014@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Configuration of django with master slave replication Postgres
In-Reply-To: <MA1PR01MB3548DF05AD5B600B7386EBFCE0570@MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox