We historically have connection pooling as an external thing; with the high
degree to which people keep implementing and reimplementing this, I think
*something* more than we have ought to be built in.

This, with perhaps better implementation, might be an apropos start.

Parallel with LDAP: it takes very much this approach, where configuration
typically offers a list of LDAP servers.  I am not certain if OpenLDAP does
round robin on the list, or if it tries targets in order, stopping when it
succeeds.  A decent debate fits in, there.

I could see this being implemented instead via something alongside
PGSERVICE; that already offers a well-defined way to capture a "registry"
of connection configuration.  Specifying a list of service names would
allow the command line configuration to remain short and yet very flexible.
On 2012-09-23 10:01 AM, "Euler Taveira" <eu...@timbira.com> wrote:

> On 23-09-2012 07:50, Satoshi Nagayasu wrote:
> > I have just written the first PoC code to enable load balancing
> > in the libpq library.
> >
> Your POC is totally broken. Just to point out two problems: (i) semicolon
> (;)
> is a valid character for any option in the connection string and (ii) you
> didn't think about PQsetdb[Login](), PQconnectdbParams() and
> PQconnectStartParams(). If you want to pursue this idea, you should think a
> way to support same option multiple times (one idea is host1, host2, etc).
>
> Isn't it easier to add support on your application or polling software?
>
>
> --
>    Euler Taveira de Oliveira - Timbira       http://www.timbira.com.br/
>    PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

Reply via email to