Subject: Re: Rename backup_label to recovery_control

From: Kyotaro Horiguchi <[email-masked]>
Date: Mon, 16 Oct 2023 13:16:42 +0900 (JST)

At Sat, 14 Oct 2023 14:19:42 -0400, David Steele <[email-masked]> wrote in 
> I was recently discussing the complexities of dealing with pg_control
> and backup_label with some hackers at PGConf NYC, when David
> Christensen commented that backup_label was not a very good name since
> it gives the impression of being informational and therefore something
> the user can delete. In fact, we see this happen quite a lot, and
> there have been some other discussions about it recently, see [1] and
> [2]. I bounced the idea of a rename off various hackers at the
> conference and in general people seemed to think it was a good idea.
> 
> Attached is a patch to rename backup_label to recovery_control. The

Just an idea in a slightly different direction, but I'm wondering if
we can simply merge the content of backup_label into control file.
The file is 8192 bytes long, yet only 256 bytes are used. As a result,
we anticipate no overhead.  Sucha configuration would forcibly prevent
uses from from removing the backup information.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

---

From: Kyotaro Horiguchi <[email-masked]>
Date: Mon, 16 Oct 2023 13:26:24 +0900 (JST)

At Mon, 16 Oct 2023 13:16:42 +0900 (JST), Kyotaro Horiguchi <[email-masked]> wrote in 
> uses from from removing the backup information.

In second thought, that would break the case of file-system level
backups, which require backup information separately from control
data.

Sorry for the noise.

---

From: Michael Paquier <[email-masked]>
Date: Mon, 16 Oct 2023 13:29:24 +0900

> uses from from removing the backup information.

With the critical assumptions behind PG_CONTROL_MAX_SAFE_SIZE, that
does not sound like a good idea to me.  And that's without the fact
that base backup labels could make the control file theoretically even
larger than PG_CONTROL_FILE_SIZE, even if that's unlikely going to
happen in practice.
--
Michael

---

From: David Steele <[email-masked]>
Date: Mon, 16 Oct 2023 09:43:03 -0400

> backups, which require backup information separately from control

Exactly -- but we do have a proposal to do the opposite and embed 
pg_control into backup_label [1] (or hopefully recovery_control).

Regards,
-David

[1] 
https://www.postgresql.org/message-id/1330cb48-4e47-03ca-f2fb-b144b49514d8%40pgmasters.net