Re: Determine state of cluster (HA)

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Determine state of cluster (HA)
Date: 2017-10-16 10:55:53
Message-ID: CABUevEz_fRkAm71+AarUYA+Kj6iV+yZSG2tLhjqQnwDYwkN9_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 16, 2017 at 4:39 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:

> On 13 October 2017 at 08:50, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> > 5. There is no way to connect to a db node with something akin to
> > SQL-Server's "application intent" flags, to allow a connection to be
> > rejected if we wish it to be a read/write connection. This helps detect
> the
> > state of the node directly without having to ask any further questions of
> > the node, and makes it easier to "stall" during connection until a proper
> > connection can be made.
>
> That sounds desirable, and a good step toward eventually being able to
> transparently re-route read/write queries from replica to master.
> Which is where I'd like to land up eventually.
>

It also sounds a lot like the connection parameter target_session_attrs,
does it not? We don't reroute active connections based on it, and we're not
smart enough to do anything beyond "try them one by one until you reach the
one with the correct attributes", but the basic functionality is there.
Basically what we already have fulfills what JD is suggesting, but not what
Craig is, if I understand it correctly.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-10-16 10:59:42 Re: Parallel safety for extern params
Previous Message Michael Paquier 2017-10-16 09:58:27 Re: relkind check in DefineIndex