Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1RQ0-0003Wf-SL for pgsql-general@arkaria.postgresql.org; Tue, 23 May 2023 12:47:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q1RPx-0005oT-Rz for pgsql-general@arkaria.postgresql.org; Tue, 23 May 2023 12:47:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1RPw-0005oI-T2 for pgsql-general@lists.postgresql.org; Tue, 23 May 2023 12:47:09 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q1RPr-001SDc-2S for pgsql-general@lists.postgresql.org; Tue, 23 May 2023 12:47:05 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 5F7C45F7B7; Tue, 23 May 2023 08:46:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snowman.net; s=dkim; t=1684846017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YI7Z7psBLu6sKm10kA5yb1X9f74ciwbtrBuU6lNJJ6I=; b=xW1JReR3fN5UZyekM7B4IKdlMAp2tUhnGvuLZE7s2eyVQKcki5XlrejpdS5p2T36Ao01XJ E0SSL52CW6H+zGfjKt3e2grL/xkMDLb3aCIqEBlb19CCPkjROWUv3wIRlmGoGsuBk4AXwC Ra0j9FPUZg8PdM19O2ldOk1Ow2sFDdI= Date: Tue, 23 May 2023 08:46:57 -0400 From: Stephen Frost To: Tony Xu Cc: Marc Millas , Thomas Kellerer , pgsql-general@lists.postgresql.org Subject: Re: Would PostgreSQL 16 native transparent data encryption support database level encryption? Message-ID: References: <08c133e0-b136-ff80-886e-b0d4f621c75c@gmail.com> <1d0735cf-b5dd-1c05-d03a-9b52ee2cc5bb@gmail.com> <5d617fb4-a2de-f6a2-f0d3-8a068ac4d83f@aklaver.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ww4WWkfTqy2fQOZr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.4 (2021-12-11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ww4WWkfTqy2fQOZr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --ww4WWkfTqy2fQOZr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEwf6gbxKhD863zrx/7WyKOINHZFUFAmRstb4ACgkQ7WyKOINH ZFWyuA/9EbBTKkZwUxkbCkvnBVM2am6y1/aSNbMYRYkiyuV6SXI0SpDw5yxcWt3X SX7EutT9pAb/2Wrv5aSiocLhl4Ovbn0UI3WcxoPaID5y8WwMDl7nGa5sf9eJ/xfa FYl8o+2XBzAdKi4aq+QQJXlHY5W2UgVUbyMukvoYNpnEyjzTwaYmtE82Np+lFGo6 WOnc3zBbZKYO7xJgUjkC5VMl04GrcRcecMCMeqchay/ogiN/5ISO1GmvGkPBtpr2 wIUrX32t2k7h007s/BjA+IJdTiZcRPGaQm4g+naPRcJHMMXYVcfZCP3lOqfcce4g 15+/LT7eObr6tdIjO7iPkythsxtP4qCz/q9foqQy7yiBMnWy8L0M6mjGeLpBoWFN exU8iSwnGUrPMGqiBvs0MO0wI19zQHYLmczf7pV5JxsOEx24s7t34PWobOiNEEx5 Bwr99u/g91EjYMJ0TwOSAsXEe9GZFS7i6AFkUD5QaOHQXuc+ZwpFfQbZo/1atc1y /ruufjydnVK6w5tRrZ8rBncjm4luCWsDPxsRihz0WAv8l0HiSR/tSEekHRd+SYG5 brKg9vzZx/uSP898tNJPkTR2QtrmORjFmE6eAMqXU8s5awNBrrHA/OTVxYZYdzoh OyHMmurdL4X0rhEqaddLnD4qpeOY3ONp3XXdIZ9lQPXDiO2fgl4= =mbql -----END PGP SIGNATURE----- --ww4WWkfTqy2fQOZr--