is the base backup protocol used by out-of-core tools?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: is the base backup protocol used by out-of-core tools?
Date: 2022-02-08 16:26:41
Message-ID: CA+TgmoazKcKUWtqVa0xZqSzbKgTH+X-aw4V7GyLD68EpDLMh8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Commit 0ba281cb4bf9f5f65529dfa4c8282abb734dd454 added a new syntax for
the BASE_BACKUP command, and commit
cc333f32336f5146b75190f57ef587dff225f565 added a new COPY subprotocol
for taking base backups. In both cases, I preserved backward
compatibility. However, nothing in PostgreSQL itself cares about this,
because if you try to run an older version of pg_basebackup against a
v15 server, it's going to fail anyway:

pg_basebackup: error: incompatible server version 15devel

From that point of view, there's no downside to removing from the
server the old syntax for BASE_BACKUP and the old protocol for taking
backups. We can't remove anything from pg_basebackup, because it is
our practice to make new versions of pg_basebackup work with old
versions of the server. But the reverse is not true: an older
pg_basebackup will categorically refuse to work with a newer server
version. Therefore keeping the code for this stuff around in the
server has no value ... unless there is out-of-core code that (a) uses
the BASE_BACKUP command and (b) wouldn't immediately adopt the new
syntax and protocol anyway. If there is, we might want to keep the
backward-compatibility code around in the server for a few releases.
If not, we should probably nuke that code to simplify things and
reduce the maintenance burden.

Patches for the nuking are attached. If nobody writes back, I'm going
to assume that means nobody cares, and commit these some time before
feature freeze. If one or more people do write back, then my plan is
to see what they have to say and proceed accordingly.

Thanks,

--
Robert Haas
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
0002-Remove-legacy-base-backup-protocol.patch application/octet-stream 12.2 KB
0001-Remove-old-base-backup-syntax.patch application/octet-stream 7.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-02-08 17:09:08 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Previous Message Andrew Dunstan 2022-02-08 15:46:29 Re: Refactoring SSL tests