Re: [HACKERS] Client Connection redirection support for PostgreSQL

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [HACKERS] Client Connection redirection support for PostgreSQL
Дата
Msg-id CAMsr+YF8spMPQRb4QQFXHkOXAy-Uspc4T5TA5EGYvjqOhAdgSQ@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] Client Connection redirection support for PostgreSQL  (Satyanarayana Narlapuram <Satyanarayana.Narlapuram@microsoft.com>)
Ответы Re: [HACKERS] Client Connection redirection support for PostgreSQL
Re: [HACKERS] Client Connection redirection support for PostgreSQL
Список pgsql-hackers
On 2 November 2017 at 14:02, Satyanarayana Narlapuram
<Satyanarayana.Narlapuram@microsoft.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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] proposal: schema variables
Следующее
От: Nico Williams
Дата:
Сообщение: Re: [HACKERS] proposal: schema variables