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 1qsP0Y-007tmo-Un for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Oct 2023 14:55:50 +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 1qsP0V-001eN9-H8 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Oct 2023 14:55:48 +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 1qsP0V-001eN1-7c for pgsql-hackers@lists.postgresql.org; Mon, 16 Oct 2023 14:55:47 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qsP0T-000ldi-18 for pgsql-hackers@postgresql.org; Mon, 16 Oct 2023 14:55:46 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-504a7f9204eso5860963e87.3 for ; Mon, 16 Oct 2023 07:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697468143; x=1698072943; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cu7s0P2dG7jTvlJf2ZGCJ3A1vP+R1P1nGeXq6w+lkMo=; b=RI5PPulgzoKm8PxVV0vHLNTb8GdetzGV8Kk6TWD7kLn8Is6ihz4CbkmOEVOq12vZpU /jXZAFBjNRh2Q1I9dsKByCZ2UWiG5rIhnTDnL5Y4sU5c0UwgyZ50mi5eGUOu+kBePX52 iUWOnkvTfK0Q3KdSJKL+C7UQRoT5ZL4Q9qz2uzpHJxmKoSEgE30d8FvSkQz+PW1TrKh1 aoL8G2ymgAg8S+VMIdYfMzel7jN82VjZ1Jo9lyC7DFY4zv8/IOuDc23xJ9azkMDY5Eom 4Jz0PTkrrk3/cbOSHn/CFfV6tL2RP6YTULYMKGZdiJhQ++LSarXeeROox7U2XhYklySP tbaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697468143; x=1698072943; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cu7s0P2dG7jTvlJf2ZGCJ3A1vP+R1P1nGeXq6w+lkMo=; b=P5X3S7cRcbSU5IJzn8bO4dyjmyV+eFEPdbo7AbuRvyVOLrvQxfO+oXfeKS/cL9rfbu J7cPFAlqpTcDBAuEkM6brASN3Rlniu7uPjHb3qSHYVcYom2+oLWSbIlrzxfnEI/L/N8v a1GcvRfMoCURQFbKEz9xNCJjgygfqYNotb9qBuyPpWY0vyycGPSPKBTY0SJQTPS4Fik0 2PdFjKdavvNfuNtZy0M+ACIol634/SxcvpJvSVEUGi3DMkEd/JCll+AljhzvNguXlS78 axnf8T4z5MNPlzgN73Z1ZaGaGZYowWrduPaeunvd3gFZMDUErod3ngHv/tHUOyyYkR+g 5ylQ== X-Gm-Message-State: AOJu0YwLTCQVBc82gKfiDWTuQw520Byvhe3qq0M2a8WyjGw7FaLIMX3t vpOYFmT4Wc2vR2DXTB8eRmNtK032QuPelp3rfFs= X-Google-Smtp-Source: AGHT+IHnBQqGMx8Qd+ji53rlR2OEHYLMh4up+AnCE/oCV+nca5ato+OA95SreEVSle55w3Vh2Ylb2waVlmZxZft3SCg= X-Received: by 2002:a19:6742:0:b0:500:b7ed:1055 with SMTP id e2-20020a196742000000b00500b7ed1055mr28956268lfj.56.1697468143116; Mon, 16 Oct 2023 07:55:43 -0700 (PDT) MIME-Version: 1.0 References: <1330cb48-4e47-03ca-f2fb-b144b49514d8@pgmasters.net> <0e088834-aa39-ed09-3ec7-31c13c629a20@pgmasters.net> <65825be1-e79a-46f4-9d9f-4ff95a10e378@pgmasters.net> In-Reply-To: From: Robert Haas Date: Mon, 16 Oct 2023 10:55:31 -0400 Message-ID: Subject: Re: The danger of deleting backup_label To: David Steele Cc: Thomas Munro , Michael Paquier , Pg Hackers , Stephen Frost Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Oct 14, 2023 at 11:33=E2=80=AFAM David Steele = wrote: > All of this is fixable in HEAD, but seems incredibly dangerous to back > patch. Even so, I have attached the patch in case somebody sees an > opportunity that I do not. I really do not think we should be even thinking about back-patching something like this. It's clearly not a bug fix, although I'm sure that someone can try to characterize it that way, if they want to make the well-worn argument that any behavior they don't like is a bug. But that's a pretty lame argument. Usage errors on the part of users are not bugs, even if we've coded the software in such a way as to make those errors more likely. I think what we ought to be talking about is whether a change like this is a good idea even in master. I don't think it's a terrible idea, but I'm also not sure that it's a good idea. The problem is that if you're doing the right thing with your backup_label, then this is unnecessary, and if you're doing the wrong thing, then why should you do the right thing about this? I mean, admittedly you can't just ignore a fatal error, but I think people will just run pg_resetwal, which is even worse than starting from the wrong checkpoint. I feel like in cases where a customer I'm working with has a bad backup, their entire focus is on doing something to that backup to get a running system back, whatever it takes. It's already too late at that point to fix the backup procedure - they only have the backups they have. You could hope people would do test restores before disaster strikes, but people who are that prepared are probably running a real backup tool and will never have this problem in the first place. Perhaps that's all too pessimistic. I don't know. Certainly, other people can have experiences that are different than mine. But I feel like I struggle to think of a case where this would have prevented a bad outcome, and that makes me wonder whether it's really a good idea to complicate the system. --=20 Robert Haas EDB: http://www.enterprisedb.com