Re: Multitenent architecture - Mailing list pgsql-general

From Vasu Madhineni
Subject Re: Multitenent architecture
Date
Msg-id CAFacQoETZGA7e6WOwgz6Q9vFd=T1xkLVuLW0DP_40h+Ty7ca6g@mail.gmail.com
Whole thread Raw
In response to Re: Multitenent architecture  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Multitenent architecture  (Rob Sargent <robjsargent@gmail.com>)
Re: Multitenent architecture  (Ravi Krishna <srkrishna@outlook.com>)
List pgsql-general
If the data size is more than 6TB, which approach better?

On Fri, Jun 5, 2020 at 2:57 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Thu, 2020-06-04 at 23:52 +0800, Vasu Madhineni wrote:
> We are planning a POC on multitenant architecture in Postgres, Could you please
> help us with steps for multitenant using schema for each application model.

For few tenants, you can keep identical tables in several schemas and
set "search_path" to select a tenant.

With many tenants, you are better off with one table that holds the
data for all clients.  You can use Row Level Security to have each
tenant see only his or her data, and it might be a good idea to
use list partitioning on the tenant ID.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Multitenent architecture
Next
From: David Rowley
Date:
Subject: Re: Possible improvement