From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Satyanarayana Narlapuram <Satyanarayana(dot)Narlapuram(at)microsoft(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Client Connection redirection support for PostgreSQL |
Date: | 2017-11-02 15:33:31 |
Message-ID: | CAMsr+YF8spMPQRb4QQFXHkOXAy-Uspc4T5TA5EGYvjqOhAdgSQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2 November 2017 at 14:02, Satyanarayana Narlapuram
<Satyanarayana(dot)Narlapuram(at)microsoft(dot)com> wrote:
> Proposal:
>
> Add the ability to the PostgreSQL server instance to route the traffic to a
> different server instance based on the rules defined in server’s pg_bha.conf
> configuration file. At a high level this enables offloading the user
> requests to a different server instance based on the rules defined in the
> pg_hba.conf configuration file.
pg_hba.conf is "host based access [control]" . I'm not sure it's
really the right place.
> Some of the interesting scenarios this
> enables include but not limited to - rerouting traffic based on the client
> hosts, users, database, etc. specified, redirecting read-only query traffic
> to the hot stand by replicas, and in multi-master scenarios.
When this has come up before, one of the issues has been determining
what exactly should constitute "read only" vs "read write" for the
purposes of redirecting work.
There are a bunch of issues there. If you're doing "read only" txns
and then do something "read write" and get redirected, the destination
doesn't have your prepared statements, any WITH HOLD cursors, temp
tables, etc you were working with. Strangeness ensues.
But we now have a session-intent stuff though. So we could possibly do
it at session level.
Backends used just for a redirect would be pretty expensive though.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Nico Williams | 2017-11-02 15:35:07 | Re: proposal: schema variables |
Previous Message | Craig Ringer | 2017-11-02 15:07:55 | Re: proposal: schema variables |