Re: [PoC] load balancing in libpq
От | Christopher Browne |
---|---|
Тема | Re: [PoC] load balancing in libpq |
Дата | |
Msg-id | CAFNqd5UNgr=3kpsv2waF3MOeHPqZEJ_jXKe2w4-o6mo4d8BKBA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PoC] load balancing in libpq (Euler Taveira <euler@timbira.com>) |
Ответы |
Re: [PoC] load balancing in libpq
|
Список | pgsql-hackers |
<p dir="ltr">We historically have connection pooling as an external thing; with the high degree to which people keep implementingand reimplementing this, I think *something* more than we have ought to be built in.<p dir="ltr">This, with perhapsbetter implementation, might be an apropos start.<p dir="ltr">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 thelist, or if it tries targets in order, stopping when it succeeds. A decent debate fits in, there.<p dir="ltr">I couldsee this being implemented instead via something alongside PGSERVICE; that already offers a well-defined way to capturea "registry" of connection configuration. Specifying a list of service names would allow the command line configurationto remain short and yet very flexible.<div class="gmail_quote">On 2012-09-23 10:01 AM, "Euler Taveira" <<ahref="mailto:euler@timbira.com">euler@timbira.com</a>> wrote:<br type="attribution" /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On 23-09-2012 07:50, Satoshi Nagayasuwrote:<br /> > I have just written the first PoC code to enable load balancing<br /> > in the libpq library.<br/> ><br /> Your POC is totally broken. Just to point out two problems: (i) semicolon (;)<br /> is a valid characterfor any option in the connection string and (ii) you<br /> didn't think about PQsetdb[Login](), PQconnectdbParams()and<br /> PQconnectStartParams(). If you want to pursue this idea, you should think a<br /> way to supportsame option multiple times (one idea is host1, host2, etc).<br /><br /> Isn't it easier to add support on your applicationor polling software?<br /><br /><br /> --<br /> Euler Taveira de Oliveira - Timbira <a href="http://www.timbira.com.br/"target="_blank">http://www.timbira.com.br/</a><br /> PostgreSQL: Consultoria, Desenvolvimento,Suporte 24x7 e Treinamento<br /><br /><br /> --<br /> Sent via pgsql-hackers mailing list (<a href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br/> To make changes to your subscription:<br/><a href="http://www.postgresql.org/mailpref/pgsql-hackers" target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/></blockquote></div>
В списке pgsql-hackers по дате отправления: