Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBHw3-0006vx-OD for pgsql-admin@arkaria.postgresql.org; Tue, 02 Apr 2019 11:50:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBHw2-0003fI-CJ for pgsql-admin@arkaria.postgresql.org; Tue, 02 Apr 2019 11:50:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBHw1-0003Yo-Sy for pgsql-admin@lists.postgresql.org; Tue, 02 Apr 2019 11:50:34 +0000 Received: from mail-oln040092254056.outbound.protection.outlook.com ([40.92.254.56] helo=APC01-PU1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBHvy-0003xf-Gf for pgsql-admin@lists.postgresql.org; Tue, 02 Apr 2019 11:50:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=es39jkddlRSiZfh4Ad3ZOh8lD9dg1sa/1gdyIc1N4ZY=; b=uktICkJv9TzvMDBVRju4FkvwvltYqLi4HO73ANADVyEZDuhfwghZXJtA60OP5E5dh5kJgWx102tUW3zfULBDMyn/T6/Y+7QitNmsFJjcmteNcqHbFPkLDJcuvNzZPk6c+YDg5t/aN2AjpWhxx9Nq3x/wBPPpRLgwUKdk+PurAt7MQSQJTAu5kJpDKHMv+vV5OeXNDOShAu3S9XPkuqabDWeG9qZZVOsmX/BaMyyhtOWhexVJ7mApikR9XHRIzzBzGCbKnu0p3470ExvlOjbNcu5VydYEzKIUv+Hn40+cMZJRF1Gox4BLPpARJMk/QBO4Fx4/SWhPgqZN9T3+1qhJDA== Received: from PU1APC01FT059.eop-APC01.prod.protection.outlook.com (10.152.252.51) by PU1APC01HT093.eop-APC01.prod.protection.outlook.com (10.152.253.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16; Tue, 2 Apr 2019 11:50:26 +0000 Received: from MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM (10.152.252.53) by PU1APC01FT059.mail.protection.outlook.com (10.152.253.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16 via Frontend Transport; Tue, 2 Apr 2019 11:50:26 +0000 Received: from MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM ([fe80::c1f8:460e:124a:283]) by MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM ([fe80::c1f8:460e:124a:283%2]) with mapi id 15.20.1750.017; Tue, 2 Apr 2019 11:50:26 +0000 From: soumitra bhandary To: "shreeyansh2014@gmail.com" , "pgsql-admin@lists.postgresql.org" Subject: Configuration of django with master slave replication Postgres Thread-Topic: Configuration of django with master slave replication Postgres Thread-Index: AQHU6UpC6yu5LvegqEWJkvjSLbrXxA== Date: Tue, 2 Apr 2019 11:50:25 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:B49C27FBEC874532A5A2B01A2C7109FC26B3F46B9ABEEDDE868A822ADE7420D8;UpperCasedChecksum:F5E87D34D3844E8F26F90874F413686F5D164D4ABA63EE4A93C00AD88890F143;SizeAsReceived:6948;Count:42 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [wvbNZOxEUyV2/nrDapKuiRiee6BSFI2tOAaPNggsVjQ7h4u3OYQKCcdgwXTCL0mKedof4UtQsHI=] x-ms-publictraffictype: Email x-incomingheadercount: 42 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031322404)(2017031323274)(1601125500)(1603101475)(1701031045);SRVR:PU1APC01HT093; x-ms-traffictypediagnostic: PU1APC01HT093: x-microsoft-antispam-message-info: EcFUVjrYVAmY08rWqei3RqoxWnUNJ2rvGoTs7LpT9TtD8Me7jKZScc0Ww4i6m006 Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b0d6c2ea-f015-4314-127b-08d6b7616578 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2019 11:50:25.8209 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT093 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Does anyone have any idea with django how to configure multiple dsn that wi= ll automatically switch to new Postgres master host in case of failover hap= pens to previous master and auto promotion of new master is done with repmg= r. My configuration is as below=20 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 aut= omatically switches to new master node in case of failover.=20 Please share the steps. Sent from my iPhone=