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 1mJILK-0001yT-Ja for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Aug 2021 16:35:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJILI-0005lH-HQ for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Aug 2021 16:35:04 +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 1mJILI-0005l9-8u for pgsql-hackers@lists.postgresql.org; Thu, 26 Aug 2021 16:35:04 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJILB-0002wF-Ow for pgsql-hackers@postgresql.org; Thu, 26 Aug 2021 16:35:03 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 0B56A5F799; Thu, 26 Aug 2021 12:34:56 -0400 (EDT) Date: Thu, 26 Aug 2021 12:34:56 -0400 From: Stephen Frost To: Bruce Momjian Cc: Robert Haas , Tom Lane , Shruthi Gowda , Andres Freund , Alvaro Herrera , Masahiko Sawada , Tom Kincaid , Amit Kapila , Thomas Munro , PostgreSQL Development , Masahiko Sawada Subject: Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce) Message-ID: <20210826163456.GD17906@tamriel.snowman.net> References: <1228555.1629216774@sss.pgh.pa.us> <20210817163317.GQ17906@tamriel.snowman.net> <1230173.1629218575@sss.pgh.pa.us> <1366142.1629222880@sss.pgh.pa.us> <20210826152437.GA28178@momjian.us> <20210826153651.GB17906@tamriel.snowman.net> <20210826154840.GF22637@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iJ4DPVtG7O6+M1+H" Content-Disposition: inline In-Reply-To: <20210826154840.GF22637@momjian.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --iJ4DPVtG7O6+M1+H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Bruce Momjian (bruce@momjian.us) wrote: > On Thu, Aug 26, 2021 at 11:36:51AM -0400, Stephen Frost wrote: > > * Bruce Momjian (bruce@momjian.us) wrote: > > > On Thu, Aug 26, 2021 at 11:00:47AM -0400, Robert Haas wrote: > > > > Anyone see a flaw in that analysis? > > >=20 > > > I am still waiting to hear the purpose of this preservation. As long= as > > > you don't apply the patch, I guess I will just stop asking. > >=20 > > I'm a bit confused why this question keeps coming up as we've discussed > > multiple reasons (incremental backups, possible use for TDE which would >=20 > I have not seen much explaination on pgBackRest, except me mentioning > it. Is this something really useful? Being able to quickly perform a backup on a newly upgraded cluster would certainly be valuable and that's definitely not possible today due to all of the filenames changing. > As far as TDE, I haven't seen any concrete plan for that, so why add > this code for that reason? That this would help with TDE (of which there seems little doubt...) is an additional benefit to this. Specifically, taking the existing work that's already been done to allow block-by-block encryption and adjusting it for AES-XTS and then using the db-dir+relfileno+block number as the IV, just like many disk encryption systems do, avoids the concerns that were brought up about using LSN for the IV with CTR and it's certainly not difficult to do, but it does depend on this change. This was all discussed previously and it sure looks like a sensible approach to use that mirrors what many other systems already do successfully. > > make this required, general improved sanity when working with pg_upgrade > > is frankly a benefit in its own right too...). If the additional code >=20 > How? I am not aware of any advantage except cosmetic. Having to resort to matching up inode numbers between the two clusters after a pg_upgrade to figure out what files are actually the same underneath is a pain that goes beyond just cosmetics imv. Removing that additional level that admins, and developers for that matter, have to go through would be a nice improvement on its own. > > was a huge burden or even a moderate one then that might be an argument > > against, but it hardly sounds like it will be given Robert's thorough > > analysis so far and the (admittedly not complete, but not that far from > > it based on the DB OID review) proposed patch. >=20 > I am find to add it if it is minor, but I want to see the calculus of > its value vs complexity, which I have not seen spelled out. I feel that this, along with the prior discussions, spells it out sufficiently given the patch's complexity looks to be reasonably minor and very similar to the existing things that pg_upgrade already does. Had pg_upgrade done this in the first place, I don't think there would have been nearly this amount of discussion about it. Thanks, Stephen --iJ4DPVtG7O6+M1+H Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJhJ8KwAAoJEO1sijiDR2RVNSEP/3XQFWVieUS82OnVEfXgcV8f jKETLDc12sUNkeLlhj5+jw6/H7I6egsxliKtWrkG0mNJP9NrAgIY7G1+SSklnLw6 +W8cbzRhbZ7hlH6r5BTqTgLRR7hQq7lj6o9YuN4hu7Gm/m+zOQQgB+FcIhZ29rXG emOyb3mD4TqRgghPBLwLrWXKQVlZ0Du6A/FEkcuk+vz8PjyJm5l+uC3ugeFWik/3 YyLFmZF0SU+M7cctFutjeFEsygB1IGE7dIoMoU1llK50YhDUEpWrKtWURKchzVN5 DEZMVsGDXNuEwzgMpTIgXRHgg1eP7SuoyDCaQ4P1U5Du31pBeBOoS8ern2V1cBof TmwVNRKQFKM5RVhuqZEXXuvlCJQMLdeDTiP24KPU2QFqczCW88bMHvKoILkGT4GT fyazrDwzEG/sZNPW6mkcYe9nk586O64wSO/ItbXoSIGfZtOe3UZ25DL0QeDWbCCN j9l+HeID6jBiLIGYqp1CbIVCPyEimQ91PHtMH/NtypnCDWeFhSsddC7kd3s8YuVP jKrq3wpLjTeOaBdF5w3BE5CuP10M1Y1oFJrCvA+Q3GS7fAaWHbmulNn+jWanRiXi Ee/0evGo+smVJZnUvNJbNXj2osPnF8WFyHKRtZcl2iCCljea0Ju/Qqw+l+FbdFfI pamYt07+50VQTu3Hq1qC =YJWO -----END PGP SIGNATURE----- --iJ4DPVtG7O6+M1+H--