Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r5ToO-00DeMu-8l for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Nov 2023 16:41:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r5ToM-000XVf-Lz for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Nov 2023 16:41:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r5ToL-000XVX-If for pgsql-hackers@lists.postgresql.org; Tue, 21 Nov 2023 16:41:18 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r5ToI-006fVA-Lh for pgsql-hackers@lists.postgresql.org; Tue, 21 Nov 2023 16:41:16 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 5B7B13200C6E; Tue, 21 Nov 2023 11:41:12 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 21 Nov 2023 11:41:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1700584871; x=1700671271; bh=1t oFFpwFmmh3rgWfdmk+a30F0wSVv7OpM5KTVxOUxGo=; b=SSNSD41RyU6ZykLPb5 tyGgaRd2ZOxY2of5IOVeKNtU66zUwF995NJ7Co3lwWHTqlMD655sczUCF1QYQ8/x wXSyfGDNYXPSLREXrKZLIQTpCyPmYFxg/alee1VgIuOdydqAnbJ3tWnOGEaofuY0 nfn2VGB4K4jn2glJS2c9uvWLvc19td1diYkqWrFSIoGfHY0qGFbVvt0NAl8E7PE+ bLOQVpicqyVIDVv+IhLR/8IdX6KMj4cT5WIM97f8LOoJ40tg2OGqybkzE45Z2QjD W0S9uCMmDVyRqr5JLDj7fGKMF89AM4oLEiHZSwi7lGA70WXkwNl8nB6yQiYmAm5P b6TQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700584871; x=1700671271; bh=1toFFpwFmmh3r gWfdmk+a30F0wSVv7OpM5KTVxOUxGo=; b=KrllJR9SCZZdikwnAsIT3WIccokWo /6pqDxRSA1CrbXOuMEnpUK5iXACdqbKUswmWsFU2TVFrCcxc+kuWaneoHVUcWQ8h fIXJy0ubkfLdh7g1xV+ZzMphF5xFo1kVbpDWNdSgtQRSF9ZFNT6CqNTExcFTUaNg nVMCR46tK9eWduC56diahMCpdu2IZqLzZMdM1yWlZSmHenoR5Pgt9kiDsHzQTKef HgWxtqabpgYwK5iw6FbXMhGupO8yuvNzrfPQdrzlQ2sHyiJRQXlXpMWHCc3uIBbt dbZBh973Qg3ckKPa6MrZpyTK+9M2UbVFHxm1c9/SUwLAbfItDLU0U+qlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegledgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Nov 2023 11:41:11 -0500 (EST) Date: Tue, 21 Nov 2023 08:41:09 -0800 From: Andres Freund To: David Steele Cc: Michael Paquier , Robert Haas , Postgres hackers Subject: Re: Add recovery to pg_control and remove backup_label Message-ID: <20231121164109.kgcpp5qvsrevz7hx@awork3.anarazel.de> References: <20231120203746.x3dgftmwvfgl5tdy@awork3.anarazel.de> <20231120235855.hukwevautrequ4ag@awork3.anarazel.de> <8f631b90-6cc2-4c48-bfe6-aaed6d07c912@pgmasters.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f631b90-6cc2-4c48-bfe6-aaed6d07c912@pgmasters.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-11-21 07:42:42 -0400, David Steele wrote: > On 11/20/23 19:58, Andres Freund wrote: > > On 2023-11-21 08:52:08 +0900, Michael Paquier wrote: > > > On Mon, Nov 20, 2023 at 12:37:46PM -0800, Andres Freund wrote: > > > > Given that, I wonder if what we should do is to just add a new field to > > > > pg_control that says "error out if backup_label does not exist", that we set > > > > when creating a streaming base backup > > > > > > That would mean that one still needs to take an extra step to update a > > > control file with this byte set, which is something you had a concern > > > with in terms of compatibility when it comes to external backup > > > solutions because more steps are necessary to take a backup, no? > > > > I was thinking we'd just set it in the pg_basebackup style path, and we'd > > error out if it's set and backup_label is present. But we'd still use > > backup_label without the pg_control flag set. > > > > So it'd just provide a cross-check that backup_label was not removed for > > pg_basebackup style backup, but wouldn't do anything for external backups. But > > imo the proposal to just us pg_control doesn't actually do anything for > > external backups either - which is why I think my proposal would achieve as > > much, for a much lower price. > > I'm not sure why you think the patch under discussion doesn't do anything > for external backups. It provides the same benefits to both pg_basebackup > and external backups, i.e. they both receive the updated version of > pg_control. Sure. They also receive a backup_label today. If an external solution forgets to replace pg_control copied as part of the filesystem copy, they won't get an error after the remove of backup_label, just like they don't get one today if they don't put backup_label in the data directory. Given that users don't do the right thing with backup_label today, why can we rely on them doing the right thing with pg_control? Greetings, Andres Freund