Re: Multiple customers sharing one database?

From: Lew <lew(at)nospam(dot)lewscanon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple customers sharing one database?
Date: 2007-06-03 17:45:50
Message-ID: 06qdnTR8iNPTY__bnZ2dnUVZ_hudnZ2d@comcast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 entire cluster, but no other data is shared across databases. Any given client connection to the server can access only the data 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 of user names means that there cannot be different users named, say, joe in two databases in the same cluster; but the system can 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Staubo 2007-06-03 17:47:04 Re: multimaster
Previous Message Lew 2007-06-03 17:35:49 Re: High-availability