Re: Multi tenancy : schema vs databases - Mailing list pgsql-general

From Achilleas Mantzios
Subject Re: Multi tenancy : schema vs databases
Date
Msg-id 57EE34A4.5050704@matrix.gatewaynet.com
Whole thread Raw
In response to Re: Multi tenancy : schema vs databases  (Rakesh Kumar <rakeshkumar464@outlook.com>)
Responses Re: Multi tenancy : schema vs databases  (Jerome Wagner <jerome.wagner@laposte.net>)
List pgsql-general
Via schemata if the tenants represent sub entities of the same organization.
This gives the top level mgmt the ability to have a consolidated view of the whole organization.

On 30/09/2016 12:06, Rakesh Kumar wrote:
>
> ________________________________________
> From: Venkata B Nagothi <nag1010@gmail.com>
> Sent: Friday, September 30, 2016 02:48
> To: Rakesh Kumar
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Multi tenancy : schema vs databases
>
> On Fri, Sep 30, 2016 at 10:16 AM, Rakesh Kumar <rakeshkumar464@outlook.com<mailto:rakeshkumar464@outlook.com>> wrote:
>
>
> ________________________________________
> From: Venkata B Nagothi <nag1010@gmail.com<mailto:nag1010@gmail.com>>
> Sent: Thursday, September 29, 2016 17:25
> To: Rakesh Kumar
> Cc: pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>
> Subject: Re: [GENERAL] Multi tenancy : schema vs databases
>
> On Fri, Sep 30, 2016 at 5:18 AM, Rakesh Kumar
<rakeshkumar464@outlook.com<mailto:rakeshkumar464@outlook.com><mailto:rakeshkumar464@outlook.com<mailto:rakeshkumar464@outlook.com>>>
wrote:
>
> Hi
>
> I would like to know which technique is better for supporting multi-tenancy=
>   applications, going upto hundreds or even thousands of tenants.
>
> 1 - One database with difference schemas (one schema per tenant)
> or
> 2 - One database per tenant.
>
> Did you mean one database with-in a postgresql cluster ?
>
> Yes.  Say something like this within a PG cluster
>
> db4978
> db6234
> ...
> 100s of such databases.
>
> That would make things worst if you are going for one database per tenant. As said by John just now, it would end up
inan very complex and bad design contributing to very poor performance and high maintenance overhead. 
> A schema per tenant would be a good idea and its hard to say without knowing the data isolation levels you require
foreach tenant. 
> ========
>
> We require complete data isolation. Absolutely nothing should be shared between two tenants.
>
> WHy would multiple dbs be any worse than multiple schemas in performance?
>
>
>
>


--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt



pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: pg_upgrade from 9.5 to 9.6 fails with "invalid argument"
Next
From: Rakesh Kumar
Date:
Subject: Re: Multi tenancy : schema vs databases