Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants. - Mailing list pgsql-performance

From Avinash Kumar
Subject Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.
Date
Msg-id CAN0TujdCgR5TA4JW6T5Di6nL5RVShbUAfY+G-7Fc-ABH4U=--g@mail.gmail.com
Whole thread Raw
In response to Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.
List pgsql-performance
Hi,

On Thu, May 7, 2020 at 5:18 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, May 7, 2020 at 1:05 PM samhitha g <samhithagarudadri@gmail.com> wrote:
Our application serves multiple tenants. Each tenant has the schema with a few hundreds of tables and few functions.
We have 2000 clients so we have to create 2000 schemas in a single database.

That is one option but I wouldn't say you must.  If you cannot get individual tables to be multi-tenant you are probably better off having one database per client on a shared cluster - at least given the size of the schema and number of clients.
I am working on a similar problem.
1 database per each client may be a killer when you have a connection pooler that creates a pool for a unique combination of (user,database). 

David J.



--
Regards,
Avinash Vallarapu
+1-902-221-5976

pgsql-performance by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.
Next
From: Rory Campbell-Lange
Date:
Subject: Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.