Re: hundreds of schema vs hundreds of databases - Mailing list pgsql-general

From Guy Rouillier
Subject Re: hundreds of schema vs hundreds of databases
Date
Msg-id 465C69E4.9040503@burntmail.com
Whole thread Raw
In response to Re: hundreds of schema vs hundreds of databases  ("Albe Laurenz" <all@adv.magwien.gv.at>)
List pgsql-general
Albe Laurenz wrote:
>
> Advantages of many databases:
> - Each database is smaller.
> - No danger of one user accessing another user's data (because of
>   misconfigured permissions and similar).
> - Guaranteed independence of each user's data.
> - More scalable: If you decide that one machine or one cluster
>   is not enough to handle the load, you can easily transfer some
>   of the databases somewhere else.
>
> Advantages of one database with many schemata:
> - Fewer databases to administrate.

Using different databases for each user incurs the full overhead of
creating and maintaining a database: all the system tables and all the
memory required to keep a database open.  If the OP is allowing direct
SQL access to each user, then the risks you identify above must be
addressed, but tbey can fairly simply by using scripts to create each
new user.  I'd opt for using schemas unless there is a compelling
evidence that different databases are required.

--
Guy Rouillier

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Best way to prevent overlapping dates
Next
From: Michael Glaesemann
Date:
Subject: Re: Best way to prevent overlapping dates