Re: Proposal: Implement failover on libpq connect level.

From: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: 2015-08-19 07:10:09
Message-ID: 20150819071009.GC31302@wagner.pp.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On 2015.08.19 at 12:42:45 +0900, Tatsuo Ishii wrote:

> I wonder how extended protocol is handled by this proposal. Suppose
> load balacing mode is enabled. PQprepare is executed on standby1. Then
> PQexecPrepared gets called. This may be executed on standby2, which
> will fail because there's no prepared statement created by the former
> PQprepare call.

Here we are discussing load-balancing on the client level, not on the
statement level.

Suppose that we have 100 readonly clients and 3 standby servers + master.
If all clients specify all four servers in the their connect strings,
and connect randomly to them, each server would have approximately 25
clients.

But once connection is established, each client works with one
server (at least until communication failure occurs and it would call
PQreset. In this case it has to reprepare statements anyway).

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2015-08-19 07:15:30 Re: Proposal: Implement failover on libpq connect level.
Previous Message Victor Wagner 2015-08-19 07:05:22 Re: Proposal: Implement failover on libpq connect level.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albe Laurenz 2015-08-19 07:15:30 Re: Proposal: Implement failover on libpq connect level.
Previous Message Victor Wagner 2015-08-19 07:05:22 Re: Proposal: Implement failover on libpq connect level.