pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: David Steele <david@pgmasters.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add recovery to pg_control and remove backup_label
Date: Tue, 21 Nov 2023 08:41:09 -0800
Message-ID: <20231121164109.kgcpp5qvsrevz7hx@awork3.anarazel.de> (raw)
In-Reply-To: <8f631b90-6cc2-4c48-bfe6-aaed6d07c912@pgmasters.net>
References: <ZVQfgWvoGDWm37J_@paquier.xyz>
<fb5a0e35-0ac0-4265-b0fe-135638adecd0@pgmasters.net>
<ZVVcZ2HooBnhld_z@paquier.xyz>
<a1d77886-97ac-4ec3-8f5d-7f0d95cbdc1e@pgmasters.net>
<ZVqzRSbi2feDhmf7@paquier.xyz>
<CA+TgmoZqyarS2ud8PXywh_+r6tsss4_D3=F+8PVSaa2MO+HPkA@mail.gmail.com>
<20231120203746.x3dgftmwvfgl5tdy@awork3.anarazel.de>
<ZVvxKDVUH-kvW_qD@paquier.xyz>
<20231120235855.hukwevautrequ4ag@awork3.anarazel.de>
<8f631b90-6cc2-4c48-bfe6-aaed6d07c912@pgmasters.net>
Hi,
On 2023-11-21 07:42:42 -0400, David Steele wrote:
> On 11/20/23 19:58, Andres Freund wrote:
> > On 2023-11-21 08:52:08 +0900, Michael Paquier wrote:
> > > On Mon, Nov 20, 2023 at 12:37:46PM -0800, Andres Freund wrote:
> > > > Given that, I wonder if what we should do is to just add a new field to
> > > > pg_control that says "error out if backup_label does not exist", that we set
> > > > when creating a streaming base backup
> > >
> > > That would mean that one still needs to take an extra step to update a
> > > control file with this byte set, which is something you had a concern
> > > with in terms of compatibility when it comes to external backup
> > > solutions because more steps are necessary to take a backup, no?
> >
> > I was thinking we'd just set it in the pg_basebackup style path, and we'd
> > error out if it's set and backup_label is present. But we'd still use
> > backup_label without the pg_control flag set.
> >
> > So it'd just provide a cross-check that backup_label was not removed for
> > pg_basebackup style backup, but wouldn't do anything for external backups. But
> > imo the proposal to just us pg_control doesn't actually do anything for
> > external backups either - which is why I think my proposal would achieve as
> > much, for a much lower price.
>
> I'm not sure why you think the patch under discussion doesn't do anything
> for external backups. It provides the same benefits to both pg_basebackup
> and external backups, i.e. they both receive the updated version of
> pg_control.
Sure. They also receive a backup_label today. If an external solution forgets
to replace pg_control copied as part of the filesystem copy, they won't get an
error after the remove of backup_label, just like they don't get one today if
they don't put backup_label in the data directory. Given that users don't do
the right thing with backup_label today, why can we rely on them doing the
right thing with pg_control?
Greetings,
Andres Freund
view thread (48+ messages) latest in thread
Message-ID: <20231121164109.kgcpp5qvsrevz7hx@awork3.anarazel.de> Permalink: ../20231121164109.kgcpp5qvsrevz7hx@awork3.anarazel.de/ Also on: postgresql.org/message-id/20231121164109.kgcpp5qvsrevz7hx@awork3.anarazel.de ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-hackers@postgresql.org Cc: andres@anarazel.de, david@pgmasters.net, michael@paquier.xyz, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Add recovery to pg_control and remove backup_label In-Reply-To: <20231121164109.kgcpp5qvsrevz7hx@awork3.anarazel.de> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox