Database Scalability

From: Saurav Sarkar <saurav(dot)sarkar1(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Database Scalability
Date: 2021-11-30 06:13:43
Message-ID: CAP+kwAU+HoYSS_WwDa17jww6sDTSQmugs9dU=PYo1D8VN-7etQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

We are using Amazon RDS PostgreSQL.
We have some multi-tenant solutions which are separating the tenant data in
Postgresql mainly in the following manner.

1. Using different schemas
2. Using different tables for different tenants.

I was just wondering what would be the best way to scale in case no. of
schemas or no. of tables limit increase and probably cross the limits of
PostgreSQL.

I understand that no. of schemas are unlimited in DB as per

https://www.postgresql.org/message-id/24478.1109618520%40sss.pgh.pa.us

and some limits on tables are mentioned here

https://www.postgresql.org/docs/12/limits.html

In case of table separated tenancy some tables might have more data than
other tables. In the case of the table itself growing in size I can look
for partitioning the data.

In the case of limits being reached in terms of tables and schemas (if any
) I understand that database sharding or horizontal scaling over multiple
database instances could be one solution. It will also help in having
more database connections/resources for an ever increasing number of
tenants . Obviously with the headache of defining a balanced sharding
strategy and maintaining it.

Thanks and Best Regards,

Saurav

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Belyashov 2021-11-30 11:16:32 Logical replication issue after Postgresql upgrade from 13 to 14
Previous Message Ali . 2021-11-30 06:01:20 Re: RE: [EXTERNAL] Re: Inserts and bad performance