Re: Multiple customers sharing one database? - Mailing list pgsql-general

From Lew
Subject Re: Multiple customers sharing one database?
Date
Msg-id 06qdnTR8iNPTY__bnZ2dnUVZ_hudnZ2d@comcast.com
Whole thread Raw
In response to Re: Multiple customers sharing one database?  (Michael Glaesemann <grzm@seespotcode.net>)
Responses Re: Multiple customers sharing one database?  (Michael Glaesemann <grzm@seespotcode.net>)
Re: Multiple customers sharing one database?  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
Rick Schumeyer wrote:
>> I'm developing an application that will be used by several independent
>> customers.  Conceptually, the data from one customer has no relation
>> at all to another customer.  In fact, each customer's data is private,
>> and you would never combine data from different customers.

Michael Glaesemann wrote:
> Unless the database schema is shared by the different customers, I'd set
> up a separate database for each. There's better security with separate
> databases, and since different customer's data would never be combined,
> there's no advantage to putting them in the same one. Per database
> overhead is probably going to be negligible compared to the
> infrastructure you'd want to put in place for security.

I am always confused by the overloaded term "database" in such discussions.
Do we mean the RDBMS engine, i.e., run separate instances of PG?  I sure would
recommend against that.  Or do we mean it as the PG documentation does, e.g.,
<http://www.postgresql.org/docs/8.1/interactive/ddl-schemas.html>

> A PostgreSQL database cluster contains one or more named databases. Users and groups of users are shared across the
entirecluster, but no other data is shared across databases. Any given client connection to the server can access only
thedata in a single database, the one specified in the connection request. 

That seems to be PostgreSQL's answer to the OP's question.

>     Note:  Users of a cluster do not necessarily have the privilege to access every database in the cluster. Sharing
ofuser names means that there cannot be different users named, say, joe in two databases in the same cluster; but the
systemcan be configured to allow joe access to only some of the databases.  

In the OP's case, "some of the databases" is "one of the databases".

--
Lew

pgsql-general by date:

Previous
From: "richyen3@gmail.com"
Date:
Subject: Re: autovacuum vacuums entire database...is this right?
Next
From: Lew
Date:
Subject: Re: High-availability