Re: Patch: Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Victor Wagner
Тема Re: Patch: Implement failover on libpq connect level.
Дата
Msg-id 20160930114451.68e0fade@fafnir.local.vm
обсуждение исходный текст
Ответ на Re: Patch: Implement failover on libpq connect level.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Ответы Re: Patch: Implement failover on libpq connect level.  (Michael Paquier <michael.paquier@gmail.com>)
Re: Patch: Implement failover on libpq connect level.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Список pgsql-hackers
On Thu, 29 Sep 2016 23:45:52 +0530
Mithun Cy <mithun.cy@enterprisedb.com> wrote:

> This patch do not apply on latest code. it fails as follows

It's strange. I have no problems applying it to commit
fd321a1dfd64d30

Ok, some trailing whitespace and mixing of tabs and spaces
which git apply doesn't like really present in the patch.

I'm attached hear version with these issues resolved.


> I am slightly confused. As per this target_server_type=master means
> user is expecting failover. What if user pass target_server_type=any
> and request sequential connection isn't this also a case for
> failover?.  I think by default it should be "any" for any number of
> hosts. And parameter "sequential and random will decide whether we
> want just failover or with load-balance.

I don't agree with this. In the first versions of the patch it refuses
connect to readonly server even if it is only one, because I think that
read-write connection is what user typically expect.

When user tries to connect to cluster (specifying many hosts in the
connect string), it can be by default assumed that he wants master.

But backward compatibility is more
important thing, so I now assume, that user tries to connect just one
node, and this node is read only, user knows what he is doing.




Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Hash Indexes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress