Re: Connection pooling for differing databases?

From: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Connection pooling for differing databases?
Date: 2019-03-08 10:36:29
Message-ID: 84e6299c-69e4-2268-05c2-f0366171635c@evolu-s.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Il 07/03/2019 21:19, Arjun Ranade ha
scritto:<br>
</div>
<blockquote type="cite"
cite="mid:CANrrCRzHGZ8+Fq0erKhEfNyZ7y_g7FDmRvU_FrSpVt1RGnPaew(at)mail(dot)gmail(dot)com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I'm looking at pgbouncer and it does most of what I need. 
I'm wondering about clients connecting via pgadmin, is there a
way for users using pgadmin or another tool to see all the
databases that are part of the configs?</div>
</div>
</blockquote>
<p>It's an issue I ran into when I set up my pgbouncer architecture,
but since all servers are reachable by the same private network
pgAdmin host is, there's no security issue in connecting directly
to them, instead of passing through pgbouncer, so I did not spend
time (that I hadn't :-)) in investigating.</p>
<p>If you resolve this (or someone has already done so), sharing the
solution would be much appreciated.</p>
<p>Cheers,</p>
<p>Moreno.-<br>
</p>
<blockquote type="cite"
cite="mid:CANrrCRzHGZ8+Fq0erKhEfNyZ7y_g7FDmRvU_FrSpVt1RGnPaew(at)mail(dot)gmail(dot)com">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Mar 7, 2019 at 2:39 PM
Moreno Andreo &lt;<a href="mailto:moreno(dot)andreo(at)evolu-s(dot)it"
moz-do-not-send="true">moreno(dot)andreo(at)evolu-s(dot)it</a>&gt;
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Il
07/03/2019 20:27, Arjun Ranade ha scritto:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I'm wondering if there's a tool like pgpool that can
provide a single <br>
&gt; origin point (host/port) that will proxy/direct
connections to the <br>
&gt; specific servers that contain the db needing to be
accessed.<br>
Yes, I think there are many, but I'm encouraging you to take a
look at <br>
pgbouncer<br>
<br>
<a href="https://pgbouncer.github.io/" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://pgbouncer.github.io/</a><br>
<br>
in pgbouncer.ini you enter database configuration values like<br>
<br>
database = host=hostname port=xyzk, like<br>
mydb1 = host=cluster1 port=6543 or<br>
mydb2 = host=cluster1 port=9876<br>
mydb3 = host=cluster2 port=6543<br>
<br>
but there many other parameters to refine your config (like
"proxying" <br>
database names, so if you share names across clusters you can
easily <br>
avoid conflicts)<br>
<br>
Pgbouncer should be installed on the same server as the
databases or in <br>
another and listens on a different port than Postgres' (say
5431 while <br>
postgres is on 5432)<br>
I'm actively using in my environment with 2 clusters and about
500 <br>
databases, works flawlessly.<br>
<br>
One thing you have to consider, if under heavy workload (say
100's of <br>
connections) is to raise kernel value of maximum open files<br>
<br>
Cheers<br>
<br>
Moreno.-<br>
<br>
<br>
<br>
</blockquote>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.7 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Etsuro Fujita 2019-03-08 11:09:23 Re: Update does not move row across foreign partitions in v11
Previous Message David Rowley 2019-03-08 10:29:30 Re: Update does not move row across foreign partitions in v11