Re: Patch: Implement failover on libpq connect level. - Mailing list pgsql-hackers

From Mithun Cy
Subject Re: Patch: Implement failover on libpq connect level.
Date
Msg-id CAD__OugQeEVEB+YdeDw9GT+CZ8M3jnbB7=KmwPhsVqEfK9Wh+w@mail.gmail.com
Whole thread Raw
In response to Re: Patch: Implement failover on libpq connect level.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Patch: Implement failover on libpq connect level.  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take
Next
From: Dmitry Dolgov
Date:
Subject: Re: [PATCH] Generic type subscription