From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Avinash Kumar <avinash(dot)vallarapu(at)gmail(dot)com> |
Cc: | Rory Campbell-Lange <rory(at)campbell-lange(dot)net>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, samhitha g <samhithagarudadri(at)gmail(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants. |
Date: | 2020-05-08 13:54:25 |
Message-ID: | CAMkU=1x8KN5n8EqWnX0A6f4YAEFpD2H78dM-1Z=ybFrmmTcvZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Thu, May 7, 2020 at 5:17 PM Avinash Kumar <avinash(dot)vallarapu(at)gmail(dot)com>
wrote:
> Hi,
>
> On Thu, May 7, 2020 at 6:08 PM Rory Campbell-Lange <
> rory(at)campbell-lange(dot)net> wrote:
>
>> One of our clusters has well over 500 databases fronted by pg_bouncer.
>>
>> We get excellent connection "flattening" using pg_bouncer with
>> per-database connection spikes dealt with through a reserve pool.
>>
> What if you see at least 4 connections being established by each client
> during peak ? And if you serve 4 or 2 connections per each DB, then you
> are creating 1000 or more reserved connections with 500 DBs in a cluster.
>
Does every database spike at the same time?
>
>> The nice thing about separate databases is that it is easy to scale
>> horizontally.
>>
> Agreed. But, how about autovacuum ? Workers shift from DB to DB and 500
> clusters means you may have to have a lot of manual vacuuming in place as
> well.
>
Why would having difference schemas in different DBs change your manual
vacuuming needs? And if anything, having separate DBs will make
autovacuuming more efficient, as it keeps the statistics collectors stats
files smaller.
Cheers,
Jeff
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Lewis | 2020-05-08 21:11:04 | Re: AutoVacuum and growing transaction XID's |
Previous Message | Jeff Janes | 2020-05-08 13:44:53 | Re: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants. |