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 1ms400-0002nh-W0 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Nov 2021 14:20:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ms3zz-0002kK-Sk for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Nov 2021 14:20:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ms3zz-0002kB-Ij for pgsql-hackers@lists.postgresql.org; Tue, 30 Nov 2021 14:20:47 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ms3zx-00032u-3t for pgsql-hackers@postgresql.org; Tue, 30 Nov 2021 14:20:47 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id BBC385F7A2; Tue, 30 Nov 2021 09:20:42 -0500 (EST) Date: Tue, 30 Nov 2021 09:20:42 -0500 From: Stephen Frost To: Tom Lane Cc: Michael Paquier , SATYANARAYANA NARLAPURAM , Pg Hackers Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file Message-ID: <20211130142042.GR26257@tamriel.snowman.net> References: <417711.1637940660@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lCKkSrrNUaKEhaIQ" Content-Disposition: inline In-Reply-To: <417711.1637940660@sss.pgh.pa.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 --lCKkSrrNUaKEhaIQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Michael Paquier writes: > > On Thu, Nov 25, 2021 at 06:19:03PM -0800, SATYANARAYANA NARLAPURAM wrot= e: > >> If we are keeping it then why not make it better? >=20 > > Well, non-exclusive backups are better by design in many aspects, so I > > don't quite see the point in spending time on something that has more > > limitations than what's already in place. >=20 > IMO the main reason for keeping it is backwards compatibility for users > who have a satisfactory backup arrangement using it. That same argument > implies that we shouldn't change how it works (at least, not very much). There isn't a satisfactory backup approach using it specifically because of this issue, hence why we should remove it to make it so users don't run into this. Would also simplify the documentation around the low level backup API, which would be a very good thing. Right now, making improvements in that area is very challenging even if all you want to do is improve the documentation around the non-exclusive API. We dealt with this as best as one could in pgbackrest for PG versions prior to when non-exclusive backup was added- which is to remove the backup_label file as soon as possible and then put it back right before you call pg_stop_backup() (since it'll complain otherwise). Not a perfect answer though and a risk still exists there of a failed restart happening. Of course, for versions which support non-exclusive backup, we use that to avoid this issue. We also extensively changed how restore works a couple releases ago and while there was some noise about it, it certainly wasn't all that bad. I don't find the reasons brought up to continue to support exclusive backup to be at all compelling and the lack of huge issues with the new way restore works to make it abundently clear that we can, in fact, remove exclusive backup in a major version change without the world coming down. Thanks, Stephen --lCKkSrrNUaKEhaIQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJhpjM6AAoJEO1sijiDR2RVAAEQALzZ561YvyDJDe2tQ1szSK+j 5K6sHPrAylnQCR7GDOdUaUf00GV7+QjtX4qY1en5eV280JvoNVeTwbXkiA92vm9A HE1iwg8QHu5XSfq2wjoSy/RUE0lWHlFWqI/KpY6ZKN81M2pi4WVisTwrkqaCVbbd Zd14GqzINs8ffAjNV8q2qMapsuZciXn8Ni9ZZRPpbSrMsJHG4p6ZB8dQ8oTrS04R 7AvaLNiaSF2Rr4M6qoynxGSgehKgCKfIW/a6FqOxhrZhKhxQ/IQGy10hMww1IyxS AeyGH7/ccXUcuS9p2mndzfbIUJOwY2noUQjsLc5VCwbkQBhaCn5A5mdFZHmC7yZQ b3vUs7qRaDPlFTZk1ILaoIGfU2ftbb2XgIPte2MG2fbUzrLEOSWwzkCe8/7mX9AF rjQGkktZBrtiKj5WvEwQgGHBUHKnHErrWqYyXTX6dTUJ8DvJvj9JBrxD5YgjO8X7 JRv6g7YtWJvVkNk/jflm/TCYdC+OubHnIDdqowoQsR79x+BnATbHzy2m/dcPWPmy IKqQFKe7BDmqL3ErIDFsBnFQlPjeA2GpFefPjO+ZQ7cwXkVht9WgTwr8ulpARV8j aG6aI9/hSk0TbNfM6PXdRhiU51EVAjHr/MwNbgGgAPaValwYsliseFO3kfhsXERN GFU8IaGSbfarnLb9yawy =Dq0p -----END PGP SIGNATURE----- --lCKkSrrNUaKEhaIQ--