From: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
---|---|
To: | laurenz(dot)albe(at)cybertec(dot)at |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jing Wang <jingwangian(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
Subject: | Re: Libpq support to connect to standby server as priority |
Date: | 2018-11-16 23:41:54 |
Message-ID: | CAJrrPGcVCjtPto8zrZhN3A6t58s=PoV=SOa6RRtKAYvUbpTD4w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Nov 17, 2018 at 4:56 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:
> 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.
>
Yes, we need either session open or reconnect it approach to find out
the whether server is read-write or read-only.
And also for read-only or prefer-read connection types, once after the
connection establishment is done, later server promotes to read-write,
I feel we can continue the connection, that decision makes the feature
simple, or do we want to stop the connection?
Regards,
Haribabu Kommi
Fujitsu Australia
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-11-17 00:06:43 | Re: ATTACH/DETACH PARTITION CONCURRENTLY |
Previous Message | Tom Lane | 2018-11-16 23:24:51 | Re: Early WIP/PoC for inlining CTEs |