Re: Patch: Implement failover on libpq connect level.

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Robert Haas' <robertmhaas(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, Peter van Hardenberg <pvh(at)pvh(dot)ca>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: Implement failover on libpq connect level.
Date: 2016-11-21 01:48:19
Message-ID: 0A3221C70F24FB45833433255569204D1F652FC8@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Robert Haas
> On Thu, Nov 17, 2016 at 10:08 PM, Craig Ringer <craig(at)2ndquadrant(dot)com>
> wrote:
> > We can and probably should have both.
> >
> > If the server tells us on connect whether it's a standby or not, use that.
> >
> > Otherwise, ask it.
> >
> > That way we don't pay the round-trip cost and get the log spam when
> > talking to newer servers that send us something useful in the startup
> > packet, but we can still query it on older servers. Graceful fallback.
> >
> > Every round trip is potentially very expensive. Having libpq do them
> > unnecessarily is bad.
>
> True, but raising the bar for this feature so that it doesn't get done is
> also bad. It can be improved in a later patch.

I thought you are very strict about performance, so I hesitate to believe you forgive the additional round trip. libpq failover is a new feature in v10, so I think it should provide the best user experience for v10 client+server users from the start. If the concern is the time for development, then support for older releases can be added in a later patch.

There are still several months left for v10. Why don't we try the best? Could you share the difficulty?

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-11-21 02:08:50 Re: Remove the comment on the countereffectiveness of large shared_buffers on Windows
Previous Message Tsunakawa, Takayuki 2016-11-21 01:33:32 Re: Patch: Implement failover on libpq connect level.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Robert Haas 2016-11-21 18:43:17 Re: Patch: Implement failover on libpq connect level.
Previous Message Tsunakawa, Takayuki 2016-11-21 01:33:32 Re: Patch: Implement failover on libpq connect level.