Re: Libpq support to connect to standby server as priority

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Libpq support to connect to standby server as priority
Дата
Msg-id 84d7a264fb5ad46873f6e40e10c3ee92983c55ca.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Libpq support to connect to standby server as priority  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Libpq support to connect to standby server as priority  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
Tom Lane wrote:
> > As it is now, the patch doesn't keep two connections open.  It remembers
> > the index of the host of the first successful writable connection, but
> > closes the connection, and opens another one to that host if no read-only
> > host can be found.
> 
> Oh!  The reason I assumed it wasn't doing that is that such a behavior
> seems completely insane.  If the point is to keep down the load on your
> master server, then connecting only to immediately disconnect is not
> a friendly way to do that --- even without counting the fact that you
> might later come back and connect again.

That's why I had argued initially to keep the session open, but you
seem to dislike that idea as well.

> If that's the best we can do, we should forget the whole feature and
> just recommend putting slave servers first in your hosts list when
> you want prefer-slave.

If you know which is which, certainly.
But in a setup with automated failover you cannot be certain which is which.
That's what the proposed feature targets.

Yours,
Laurenz Albe



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Speeding up INSERTs and UPDATEs to partitioned tables