Re: Proposal: Implement failover on libpq connect level. - Mailing list pgsql-hackers

From Victor Wagner
Subject Re: Proposal: Implement failover on libpq connect level.
Date
Msg-id 20150819071009.GC31302@wagner.pp.ru
Whole thread Raw
In response to Re: Proposal: Implement failover on libpq connect level.  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: Proposal: Implement failover on libpq connect level.  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
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).




pgsql-hackers by date:

Previous
From: Victor Wagner
Date:
Subject: Re: Proposal: Implement failover on libpq connect level.
Next
From: Albe Laurenz
Date:
Subject: Re: Proposal: Implement failover on libpq connect level.