From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Israel Brewster <israel@brewstersoft.com>
To: pgsql-general@postgresql.org
Subject: Re: Table partitioning for cloud service?
Date: Thu, 21 May 2020 08:36:24 -0700
Message-ID: <bbcaac9d-4da1-d087-c845-5580b6c7a709@aklaver.com> (raw)
In-Reply-To: <29ACFF1C-FF57-4A36-B3B4-F92C817D3AE8@brewstersoft.com>
References: <29ACFF1C-FF57-4A36-B3B4-F92C817D3AE8@brewstersoft.com>
On 5/21/20 8:29 AM, Israel Brewster wrote:
> I’m working on my first cloud service, which will be backed by a
> postgresql database. Currently I only have a single customer, but of
> course I want to design with the possibility of multiple customers in
> mind. In that vein, I’m wondering what is “typical” in terms of
> designing the DB structure to make sure that one customer doesn’t
> “accidentally" get data for another customer? At the moment I am leaning
> towards giving each customer their own set of tables, with a unique
> prefix for each. This would provide a “hard” separation for the data,
^^^^^^^^^^^^ I think that is called a schema:)
Or set up a separate database for each in the cluster.
> but would also increase maintenance efforts, as if I needed to add a
> field I would have to add it to every table. On the other hand, keeping
> everything in the same set of tables would mean having to be VERY
> careful with my SQL to make sure no customer could access another’s data.
>
> How is this typically done?
>
> ---
> Israel Brewster
> BrewsterSoft Development
> http://www.brewstersoft.com <http://www.brewstersoft.com/;
> Home of EZPunch and Lyrics Presenter
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, israel@brewstersoft.com
Subject: Re: Table partitioning for cloud service?
In-Reply-To: <bbcaac9d-4da1-d087-c845-5580b6c7a709@aklaver.com>
References: <29ACFF1C-FF57-4A36-B3B4-F92C817D3AE8@brewstersoft.com> <bbcaac9d-4da1-d087-c845-5580b6c7a709@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox