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__OugZw4oVQG+Qorc3KTVWEPe1uQ4ju01nNj0r80iRt952bA@mail.gmail.com
Whole thread Raw
In response to Re: Patch: Implement failover on libpq connect level.  (Catalin Iacob <iacobcatalin@gmail.com>)
Responses Re: Patch: Implement failover on libpq connect level.  (Robert Haas <robertmhaas@gmail.com>)
Re: Patch: Implement failover on libpq connect level.  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
List pgsql-hackers
On Wed, Nov 23, 2016 at 10:19 PM, Catalin Iacob <iacobcatalin@gmail.com> wrote:
   On Tue, Nov 22, 2016 at 8:38 AM, Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com> wrote:
 >> If you want to connect to a server where the transaction is read-only, then shouldn't the connection parameter be something like  >>"target_session_attrs=readonly"?  That represents exactly what the code does.

 >FWIW I find this to be a reasonable compromise. To keep the analogy
 >with the current patch it would be more something like "target_session_attrs=read_write|any".

I have taken this suggestion now renamed target_server_type to target_session_attrs with possible 2 values "read-write", "any".
May be we could expand to "readonly" and "prefer-readonly" in next patch proposal. Attaching the patch for same.
--
Thanks and Regards
Mithun C Y

Attachment

pgsql-hackers by date:

Previous
From: Rushabh Lathia
Date:
Subject: Re: Gather Merge
Next
From: Etsuro Fujita
Date:
Subject: Re: Push down more full joins in postgres_fdw