From: Stephen Frost <sfrost@snowman.net>
To: Tony Xu <tony.xu@rubrik.com>
Cc: Marc Millas <marc.millas@mokadb.com>
Cc: Thomas Kellerer <shammat@gmx.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Would PostgreSQL 16 native transparent data encryption support database level encryption?
Date: Tue, 23 May 2023 08:46:57 -0400
Message-ID: <ZGy1wW2a8TEbotb8@tamriel.snowman.net> (raw)
In-Reply-To: <CACufLfwDbvsF9d_AxZb1Co0SJJB2XnCYuwQ5+FhVtGF3VYBQmg@mail.gmail.com>
References: <CACufLfw0y3v1kfz-OVP5OupP_b5sei-x_gfh16Lx=Pgd6jehrQ@mail.gmail.com>
<ZGZKN0fQORPPNqc5@tamriel.snowman.net>
<08c133e0-b136-ff80-886e-b0d4f621c75c@gmail.com>
<f714e518-374a-8d74-1119-9a363857a367@gmail.com>
<1d0735cf-b5dd-1c05-d03a-9b52ee2cc5bb@gmail.com>
<5d617fb4-a2de-f6a2-f0d3-8a068ac4d83f@aklaver.com>
<CADX_1abemND-2kO4sc8erSTr=WdP96Wp2onZfKbE2f+VYrP4CA@mail.gmail.com>
<a3a68610-1b16-1ef5-11cd-2d191faec868@gmx.net>
<CADX_1abAcP60kOA2U-b4oj5KGgJqSoLxYDR731L2YHcANZsNEw@mail.gmail.com>
<CACufLfwDbvsF9d_AxZb1Co0SJJB2XnCYuwQ5+FhVtGF3VYBQmg@mail.gmail.com>
Greetings,
There seems to be a bit of confusion here, so I'll try to clear it up.
* Tony Xu (tony.xu@rubrik.com) wrote:
> Thanks all for the discussions. It sounds like there are different
> questions to clear before we can get to a conclusion on if per-database KEK
> is possible or not.
It's not possible in PG's design today to ensure that all user data is
segregated by database, due to the fact that there's a shared WAL which
includes data from all databases running under a given postmaster
(typically considered a 'cluster' or 'instance'). There are also shared
catalogs which aren't per-database to begin with (as for if that's
considered user data or not depends on your definition of user data..
are users/roles considered user data, or not?).
> First question - do we, as a community, see the value of the proposal and
> do we believe that value is big enough for us to make any necessary changes
> to PostgreSQL? Another way to ask is, do we want/need to keep the parity
> with other database solutions that already have such ability?
TDE is clearly valuable to this community and multiple organizations
have implemented it already and there's an ongoing effort to bring TDE
into core, with patches already posted and many of these design
decisions made. Given the point made above, it seems very unlikely that
the basics of the design are going to change, at least not unless PG
changes in some fundamental way when it comes to WAL and how shared
catalogs and databases work (note: I'm not aware of anyone currently
working on this..).
> If the answer to the first question is no, then I will stop here.
> However, if the answer is yes or "it depends", then the second question is
> on how - It seems that per-cluster KEK can be a a good alternative to
> achieve the same as per-db KEK, however, there are still some shared area
> between clusters. Is it possible to further split this shared area? Are
> there more shared memory/storage between clusters?
There isn't anything shared between PG clusters, to be clear. A
"cluster" in PG is all data and processes running under one
"postmaster", there is nothing shared between two PG clusters.
Splitting up the WAL to be per-database has been contemplated before but
there's no active work trying to achieve that and there's a lot of
complications associated with trying to do that (such as- what to do
about the shared catalogs...).
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: sfrost@snowman.net, tony.xu@rubrik.com, marc.millas@mokadb.com, shammat@gmx.net
Subject: Re: Would PostgreSQL 16 native transparent data encryption support database level encryption?
In-Reply-To: <ZGy1wW2a8TEbotb8@tamriel.snowman.net>
References: <CACufLfw0y3v1kfz-OVP5OupP_b5sei-x_gfh16Lx=Pgd6jehrQ@mail.gmail.com> <ZGZKN0fQORPPNqc5@tamriel.snowman.net> <08c133e0-b136-ff80-886e-b0d4f621c75c@gmail.com> <f714e518-374a-8d74-1119-9a363857a367@gmail.com> <1d0735cf-b5dd-1c05-d03a-9b52ee2cc5bb@gmail.com> <5d617fb4-a2de-f6a2-f0d3-8a068ac4d83f@aklaver.com> <CADX_1abemND-2kO4sc8erSTr=WdP96Wp2onZfKbE2f+VYrP4CA@mail.gmail.com> <a3a68610-1b16-1ef5-11cd-2d191faec868@gmx.net> <CADX_1abAcP60kOA2U-b4oj5KGgJqSoLxYDR731L2YHcANZsNEw@mail.gmail.com> <CACufLfwDbvsF9d_AxZb1Co0SJJB2XnCYuwQ5+FhVtGF3VYBQmg@mail.gmail.com> <ZGy1wW2a8TEbotb8@tamriel.snowman.net>
* 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