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 1qqhaw-000eiu-Ml for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 22:22:23 +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 1qqhat-001IX9-LN for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 22:22:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qqhas-001IX0-Rv for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 22:22:20 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qqhap-00040V-LN for pgsql-hackers@postgresql.org; Wed, 11 Oct 2023 22:22:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 75C825C035D; Wed, 11 Oct 2023 18:22:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 11 Oct 2023 18:22:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; 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=fm2; t=1697062935; x=1697149335; bh=cp cEiaG6EZrApdJNhkHkSbaAz4TecrVqQRuB4XZbZSU=; b=OMgab6D0DL0byd0OtN AgijO3vFYt8khcI9vYMNThCtdku2J+F2XHqkB7NSXRKIhOxcaV17VARaEYZC3PWV IHtA5ulILje2m7Q9OL0Fv5cVmhOW9YIt0lF7XyPvfyrNkGmw9mSmVUmAY41BvaMP 29mRi7eWym3TLf4UUBTmBV84jq06ZLa9v/J/KD5TKapJAd8p+1V4b5OQ5IYTD89W jCO87p7eudgHJaw3vuhynQXD0SyK3QhsslVOCj/ZK7wUoTdGB5CkIrvOL9pCYsg7 Z6PQPmXkxSzVUPB77JByslqbR2erOklVSJjJbzDa4v7U8lmPPutU2ayl4UJEBzqe fhFg== 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=fm2; t=1697062935; x=1697149335; bh=cpcEiaG6EZrAp dJNhkHkSbaAz4TecrVqQRuB4XZbZSU=; b=gj1MzvNdm9HoGDhkF/H47hSxhptaj y7jzkRIUbC2OPsfOxQuEuwL4Gg6a1qVnrpthErfpSmKdX5YyHWRe6XV9xMyvPmy8 Iwymd/PI+op2M7Zp7iC75gbwBXokI9fmlA8RXYlv6ujmTKt+pYtuK82Ev22YQKFZ 11eTN42tQxHocsZUCF3F6ytr61rfXzd2fNXEBc2PvsoLDmJD6c1aar2/F3OHn0vI rcXmJ4LoKPohL9YqqGbu8wtv7NR6UiDlm8/KC9beov2ZebFrkw3+6xMi1u0in/jK OrzdIGSRYCmAYqBz8Zxk1x0KdgS+QqONdMLixNmt0+4nO4pox7Lgno5vg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheelgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Oct 2023 18:22:14 -0400 (EDT) Date: Thu, 12 Oct 2023 07:22:09 +0900 From: Michael Paquier To: David Steele Cc: Pg Hackers Subject: Re: The danger of deleting backup_label Message-ID: References: <1330cb48-4e47-03ca-f2fb-b144b49514d8@pgmasters.net> <0e088834-aa39-ed09-3ec7-31c13c629a20@pgmasters.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5/jT1sh1TzjIWapI" Content-Disposition: inline In-Reply-To: <0e088834-aa39-ed09-3ec7-31c13c629a20@pgmasters.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --5/jT1sh1TzjIWapI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 10, 2023 at 05:06:45PM -0400, David Steele wrote: > That fails because there is a check to make sure the checkpoint is valid > when pg_control is loaded. Another possibility is to use a special LSN li= ke > we use for unlogged tables. Anything >=3D 24 and < WAL segment size will = work > fine. Do we have any reason to do that in the presence of a backup_label file anyway? We'll know the LSN of the checkpoint based on what the base backup wants us to use. Using a fake-still-rather-valid value for the LSN in the control file to bypass this check does not address the issue you are pointing at: it is just avoiding this check. A reasonable answer would be, IMO, to just not do this check at all based on the control file in this case. >> If the contents of the control file are tweaked before sending it >> through a BASE_BACKUP, it would cover more than just pg_basebackup. >> Switching the way the control file is sent with new contents in >> sendFileWithContent() rather than sendFile() would be one way, for >> instance.. >=20 > Good point, and that makes this even more compelling. If we include > pg_control into backup_label then there is no need to modify pg_control (= as > above) -- we can just exclude it from the backup entirely. That will > certainly require some rejigging in recovery but seems worth it for backup > solutions that can't easily modify pg_control. The C-based solutions can = do > this pretty easily but it is a pretty high bar for anyone else. I have little idea about that, but I guess that you are referring to backrest here. -- Michael --5/jT1sh1TzjIWapI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmUnIBEACgkQnvQgOdby QH0GDBAAnx6+9Av40hfxQs6qIwvkwJB0ea7TdiWioKrNhbJbO5WslkSXDRX2Sv04 Rmb4J7vWWsXZ3vn0Ya2G9bmCowDRJPnSBNkW6MjX9RYgNq5WUdU2TZtNkoPsqCfc NlmE1nLfhH1Ekk/dBYLbl7EHwHqxooeHYK6rTPHCYyzuKZkZ0SagnyoX/CUtDW3V ajLCKCSuclb+il8eyFUB3GAjKCXYYGsfhkw768/YtFZApH8LKqjFt7lAbO2kuaNc bmNRtC6Y3wIpj6pHyD6J/7QzCBCeaJ6k49frTcJMA719U0yFbnEj3HRXOaz4PLjP VdR0P4bmY1XGbKjdOl7r3ui1oOQf92TggcEVLGmWpSSHFXygMUczJapE6pdMZxSt CYB15Ez6OtcIxOIWPnTHbr2D1lx0wozVotHPQw8DOmOCxfLZFtUBOIdoDo9BArQC 8qP+q6e1NCzQkBgWj+5MWbbfV5D//FEYHj9q7+9ZjjTIUjpnjUgcPsnRQDgvB19D HXdtTRPhAhYyPYaC/ZLh0Yu6gkdQnLa9d+Kh6HLntQabvMbYJE/5pJrPziHuoluG Gsiqy10kSgvYXoUtTPayy2jqcAlfFvpi/yIyRo59sg7gpkg7uEenEhJTlIse6EUG 76L+d+4232unrlTcDOkN+Op+3pakggfJOioT8DhljO+byp8m2Ds= =hn6H -----END PGP SIGNATURE----- --5/jT1sh1TzjIWapI--