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 1qsXHQ-008Ot2-Cz for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Oct 2023 23:45:48 +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 1qsXHN-005DPd-TL for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Oct 2023 23:45:46 +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 1qsXHN-005DPV-Jm for pgsql-hackers@lists.postgresql.org; Mon, 16 Oct 2023 23:45:46 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsXHK-00159g-A7 for pgsql-hackers@postgresql.org; Mon, 16 Oct 2023 23:45:45 +0000 Received: from [10.5.0.2] (unknown [45.14.195.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 1AE52548C8; Mon, 16 Oct 2023 23:45:41 +0000 (UTC) Message-ID: Date: Mon, 16 Oct 2023 19:45:35 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: The danger of deleting backup_label Content-Language: en-US To: Robert Haas Cc: Thomas Munro , Michael Paquier , Pg Hackers , Stephen Frost References: <1330cb48-4e47-03ca-f2fb-b144b49514d8@pgmasters.net> <0e088834-aa39-ed09-3ec7-31c13c629a20@pgmasters.net> <65825be1-e79a-46f4-9d9f-4ff95a10e378@pgmasters.net> <9dc67363-5200-7395-3ddb-b50171800bc6@pgmasters.net> <12bf9438-f229-5048-dd91-440f3b1880e9@pgmasters.net> From: David Steele In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/16/23 15:06, Robert Haas wrote: > On Mon, Oct 16, 2023 at 1:00 PM David Steele wrote: >> After some agonizing (we hope) they decide to delete backup_label and, >> wow, it just works! So now they merrily go on their way with a corrupted >> cluster. They also remember for the next time that deleting backup_label >> is definitely a good procedure. >> >> The idea behind this patch is that deleting backup_label would produce a >> hard error because pg_control would be missing as well (if the backup >> software did its job). If both pg_control and backup_label are present >> (but pg_control has not been loaded with the contents of backup_label, >> i.e. it is the running copy from the backup cluster) we can also error. > > I mean, I think we're just going in circles, here. I did and do > understand, but I didn't and don't agree. You're hypothesizing a user > who is willing to do ONE thing that they shouldn't do during backup > restoration (namely, remove backup_label) but who won't be willing to > do a SECOND thing that they shouldn't do during backup restoration > (namely, run pg_resetwal). In my experience the first case is much more likely than the second. Your experience may vary. Anyway, I think they are pretty different. Deleting backup label appears to give a perfectly valid restore. Running pg_resetwal is more clearly (I think) the nuclear solution. > I understand that you feel differently, and that's fine, but I don't > think our disagreement here stems from me being confused. I just ... > don't agree. Fair enough, we don't agree. Regards, -David