Re: Patch: Implement failover on libpq connect level.
Mithun Cy <mithun.cy@enterprisedb.com>
From: Mithun Cy <mithun.cy@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>,
Peter van Hardenberg <pvh@pvh.ca>, Peter Eisentraut <peter_e@gmx.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2016-11-17T11:33:15Z
Lists: pgsql-hackers
Attachments
- failover_to_new_master-v2.patch (application/octet-stream) patch v2
On Thu, Nov 17, 2016 at 8:27 AM, Robert Haas <robertmhaas@gmail.com> wrote: >but SELECT pg_is_in_recovery() and SHOW transaction_read_only >exist in older versions so if we pick either of those methods then it >will just work. I am adding next version of the patch it have following fixes. Tsunakawa's comments 1. PGconn->target_server_type is now freed in freePGconn() 2. Added PGTARGETSERVERTYPE. *Additional comments from others* 3. Moved from SELECT pg_is_in_recovery() to SHOW transaction_read_only now should handle different kind of replication, as we recognise server to which writable connection can be made as primary. Very exactly like JDBC driver. Also documented about it. 4. renamed words from master to primary. -- Thanks and Regards Mithun C Y EnterpriseDB: http://www.enterprisedb.com
Commits
-
libpq: Add target_session_attrs parameter.
- 721f7bd3cbcc 10.0 landed
-
Remove superuser checks in pgstattuple
- fd321a1dfd64 10.0 cited
-
Fix unwanted flushing of libpq's input buffer when socket EOF is seen.
- c405918858c0 9.6.0 cited