diff options
author | Robert Haas <rhaas@postgresql.org> | 2022-02-08 11:17:21 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2022-02-10 12:12:43 -0500 |
commit | 0d4513b6138650355fcc981a9f34ff57b8d69db4 (patch) | |
tree | 71050283413e5c8211595b250b784c3b6ec684b5 /src/backend/replication/basebackup.c | |
parent | d37776e451e3481d7364137a0b159102bb05992a (diff) |
Remove server support for the previous base backup protocol.
Commit cc333f32336f5146b75190f57ef587dff225f565 added a new COPY
sub-protocol for taking base backups, but retained support for the
previous protocol. For the same reasons articulated in the message
for commit 9cd28c2e5f11dfeef64a14035b82e70acead65fd, remove support
for the previous protocol from the server.
Discussion: http://postgr.es/m/CA+TgmoazKcKUWtqVa0xZqSzbKgTH+X-aw4V7GyLD68EpDLMh8A@mail.gmail.com
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r-- | src/backend/replication/basebackup.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 10ce2406c0f..fcd9161f749 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -56,7 +56,6 @@ typedef enum { BACKUP_TARGET_BLACKHOLE, - BACKUP_TARGET_COMPAT, BACKUP_TARGET_CLIENT, BACKUP_TARGET_SERVER } backup_target_type; @@ -719,7 +718,7 @@ parse_basebackup_options(List *options, basebackup_options *opt) bool o_compression_level = false; MemSet(opt, 0, sizeof(*opt)); - opt->target = BACKUP_TARGET_COMPAT; + opt->target = BACKUP_TARGET_CLIENT; opt->manifest = MANIFEST_OPTION_NO; opt->manifest_checksum_type = CHECKSUM_TYPE_CRC32C; opt->compression = BACKUP_COMPRESSION_NONE; @@ -992,16 +991,11 @@ SendBaseBackup(BaseBackupCmd *cmd) * protocol. If the target is specifically 'client' then set up to stream * the backup to the client; otherwise, it's being sent someplace else and * should not be sent to the client. - * - * If the TARGET option was not specified, we must fall back to the older - * and less capable copy-tablespace protocol. */ if (opt.target == BACKUP_TARGET_CLIENT) sink = bbsink_copystream_new(true); - else if (opt.target != BACKUP_TARGET_COMPAT) - sink = bbsink_copystream_new(false); else - sink = bbsink_copytblspc_new(); + sink = bbsink_copystream_new(false); /* * If a non-default backup target is in use, arrange to send the data @@ -1012,7 +1006,6 @@ SendBaseBackup(BaseBackupCmd *cmd) case BACKUP_TARGET_BLACKHOLE: /* Nothing to do, just discard data. */ break; - case BACKUP_TARGET_COMPAT: case BACKUP_TARGET_CLIENT: /* Nothing to do, handling above is sufficient. */ break; |