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 1qsw3e-00AAMW-A3 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Oct 2023 02:13:14 +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 1qsw3b-00GBak-Di for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Oct 2023 02:13:12 +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 1qsw3b-00GBac-46 for pgsql-hackers@lists.postgresql.org; Wed, 18 Oct 2023 02:13:11 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qsw3W-0010xd-78 for pgsql-hackers@postgresql.org; Wed, 18 Oct 2023 02:13:10 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6b20577ef7bso3839124b3a.3 for ; Tue, 17 Oct 2023 19:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697595185; x=1698199985; darn=postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=YV/gQxc6ZZpCEvW4F5tjzKwB1SfSjKcWx1ZECu8xfkk=; b=IL4bbXXI4PU7E0OlMosRLodWedM2qBPsuCxEoMbKveLnHGiwPPtPEYHP0Ayc2WqY3l rq/en6EfLwUbH1uGmeO25dxqW8B/NClcO6kzPHoAnuV0h69RpXThYCehcYP5yVIpdAaq 7GDZLQ5Lnbyw+K11N3Ljk6t2Qxr5UKmjFcVC7RqCprrAjsJLeOX3ghGNpTN8IqG0F0Yv LeJO2wlk9IVV9tIP8PlJnVUkf7aSK8DSqPBHAU0UFWaprRgsC7OH8dcwMXbf7rFrtXBJ HAZYYUvGMWOd0Zg7nTXdj5o+JZ9AaXw/8zngwg0YUJdQLJj7yvWneLL+jUlQNzjIT7Lj Qy4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697595185; x=1698199985; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YV/gQxc6ZZpCEvW4F5tjzKwB1SfSjKcWx1ZECu8xfkk=; b=FhUO6PqGoS/WDXt4jy01aXDLn8nlZWvLSzD5SS+wlib6MoXQ/HqXzmdOovVxSDWTDt elZPDHbhg1f6BrKXtVXXyPX3pibu+OIFjN9tpUi4ryeyq/hh9EqJzV5B1lMjXJqdj21d 0BcJrsya7mxUbK6rKeZ784oCutnneTcPbrmkIhht+4ocKQgWsfR5ueYiHS9+WLp+dBu8 vb+c0fkyUBjFIf5LtXelgTaZK9ZC15y3S0+noGW3ZPM6GvrOa4GxnUK0TjfxAROwll7F k8RV83Xz7Pw6yefTr9i72uXOAFvemDJb18zgaWymw3LyIQcIXvRF/sdaTF3sEb7LCv/s O3wA== X-Gm-Message-State: AOJu0Ywz19z0rTZhStlOULmaHnieuSksk82bAU0AaNOV/CIp1jtkQxXY c58eF+oSXy/DaETUvBZ+mcw= X-Google-Smtp-Source: AGHT+IHYRFW37JFo5ol7V6xSBqTON5RqcD5KvHhQpqbDbHTSvQcoarVTMMj9O+LYALbK/W5tXzYRrw== X-Received: by 2002:a05:6300:8085:b0:16b:80f2:f30c with SMTP id ap5-20020a056300808500b0016b80f2f30cmr3681760pzc.26.1697595185012; Tue, 17 Oct 2023 19:13:05 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id x3-20020a170902ec8300b001b890009634sm2271101plg.139.2023.10.17.19.13.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 19:13:04 -0700 (PDT) Date: Wed, 18 Oct 2023 11:13:01 +0900 (JST) Message-Id: <20231018.111301.602565389803838288.horikyota.ntt@gmail.com> To: david@pgmasters.net Cc: thomas.munro@gmail.com, michael@paquier.xyz, pgsql-hackers@postgresql.org, sfrost@snowman.net Subject: Re: The danger of deleting backup_label From: Kyotaro Horiguchi In-Reply-To: <0f948866-7caf-0759-d53c-93c3e266ec3f@pgmasters.net> References: <65825be1-e79a-46f4-9d9f-4ff95a10e378@pgmasters.net> <0f948866-7caf-0759-d53c-93c3e266ec3f@pgmasters.net> User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Tue, 17 Oct 2023 16:16:42 -0400, David Steele wrote in > Given that the above can't be back patched, I'm thinking we don't need > backup_label at all going forward. We just write the values we need > for recovery into pg_control and return *that* from pg_backup_stop() > and tell the user to store it with their backup. We already have > "These files are vital to the backup working and must be written byte > for byte without modification, which may require opening the file in > binary mode." in the documentation so dealing with pg_control should > not be a problem. pg_control also has a CRC so we will know if it gets > munged. I'm somewhat perplexed regarding the objective of this thread. This thread began with the intent of preventing users from removing the backup_label from a backup. At the beginning, the proposal aimed to achieve this by injecting an invalid value to pg_control file located in the generated backup. However, this (and previous) proposal seems to deviate from that initial objective. It now eliminates the need to be concerned about the pg_control version that is coped into the generated backup. However, if someone removes the backup_label from a backup, the initial concerns could still surface. regards. -- Kyotaro Horiguchi NTT Open Source Software Center