<div dir="auto">What about using PgBouncer as a route layer. It routes the connection to an specific DB server that could be one pgpool node than makes load balancing to others postgres???<div dir="auto"><br></div><div dir="auto">Connections to DB A goes to PgPool A that works with PG server A1, A2, etc</div><div dir="auto"><br></div><div dir="auto">Then Connections to DB B goes to PgPool B that works with PG server B1, B2, etc</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 12 Apr 2021, 10:46 am Kyaw Zin Win, <<a href="mailto:kz.win@seismic.com">kz.win@seismic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_4851170716097359180WordSection1">
<p class="MsoNormal">Dear List,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We have a 1.3TB a single postgres instance in one database that houses multiple tenants.  Each tenant is given a dedicated schema and we have about 1000 tenants or so.  We would like to split up the server/database into smaller instances
 with each holding different set of tenants.  So server 1 will have tenants number 0-100.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is it possible to use pgpool between our application and multiple postgres instances in a way that application can connect to pgpool using a single connection string and pgpool do the right routing?  All my reading says that pgpool only
 routes to different backends for SELECT queries.  Upon reading the source code, I find `is_select_query` function; if I patch the function to just return true almost unconditionally, do you think pgpool will route any requests?  Can we rely on other pgpool
 config (such as routing to specific nodes based on database)  to make this possible?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We are also wondering whether we can leverage slony mode and load balancing.  Does pgpool distribute all queries (read and write) to all bankends in this mode?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">k.z.win<u></u><u></u></p>
</div>
</div>

_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank" rel="noreferrer">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div>