Re: [PoC] load balancing in libpq
Euler Taveira <euler@timbira.com>
From: Euler Taveira <euler@timbira.com>
To: Satoshi Nagayasu <snaga@uptime.jp>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2012-09-23T13:56:14Z
Lists: pgsql-hackers
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