From 9cd28c2e5f11dfeef64a14035b82e70acead65fd Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 8 Feb 2022 10:53:59 -0500 Subject: [PATCH] Remove server support for old BASE_BACKUP command syntax. Commit 0ba281cb4bf9f5f65529dfa4c8282abb734dd454 added a new syntax for the BASE_BACKUP command, with extensible options, but maintained support for the legacy syntax. This isn't important for PostgreSQL, where pg_basebackup works with older server versions but not newer ones, but it could in theory matter for out-of-core users of the replication protocol. Discussion on pgsql-hackers, however, suggests that no one is aware of any out-of-core use of the BASE_BACKUP command, and the consensus is in favor of removing support for the old syntax to simplify the code, so do that. Discussion: http://postgr.es/m/CA+TgmoazKcKUWtqVa0xZqSzbKgTH+X-aw4V7GyLD68EpDLMh8A@mail.gmail.com --- doc/src/sgml/protocol.sgml | 11 --- src/backend/replication/repl_gram.y | 97 ++------------------------ src/backend/replication/repl_scanner.l | 10 --- 3 files changed, 4 insertions(+), 114 deletions(-) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 24e93f9b28..71f746e891 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -3041,17 +3041,6 @@ The commands accepted in replication mode are: - - - BASE_BACKUP [ LABEL 'label' ] [ PROGRESS ] [ FAST ] [ WAL ] [ NOWAIT ] [ MAX_RATE rate ] [ TABLESPACE_MAP ] [ NOVERIFY_CHECKSUMS ] [ MANIFEST manifest_option ] [ MANIFEST_CHECKSUMS checksum_algorithm ] - - - - For compatibility with older releases, this alternative syntax for - the BASE_BACKUP command is still supported. - - - diff --git a/src/backend/replication/repl_gram.y b/src/backend/replication/repl_gram.y index 3b92180e8c..ee0c0774ea 100644 --- a/src/backend/replication/repl_gram.y +++ b/src/backend/replication/repl_gram.y @@ -67,15 +67,7 @@ Node *replication_parse_result; %token K_CREATE_REPLICATION_SLOT %token K_DROP_REPLICATION_SLOT %token K_TIMELINE_HISTORY -%token K_LABEL -%token K_PROGRESS -%token K_FAST %token K_WAIT -%token K_NOWAIT -%token K_MAX_RATE -%token K_WAL -%token K_TABLESPACE_MAP -%token K_NOVERIFY_CHECKSUMS %token K_TIMELINE %token K_PHYSICAL %token K_LOGICAL @@ -86,15 +78,13 @@ Node *replication_parse_result; %token K_EXPORT_SNAPSHOT %token K_NOEXPORT_SNAPSHOT %token K_USE_SNAPSHOT -%token K_MANIFEST -%token K_MANIFEST_CHECKSUMS %type command %type base_backup start_replication start_logical_replication create_replication_slot drop_replication_slot identify_system read_replication_slot timeline_history show -%type base_backup_legacy_opt_list generic_option_list -%type base_backup_legacy_opt generic_option +%type generic_option_list +%type generic_option %type opt_timeline %type plugin_options plugin_opt_list %type plugin_opt_elem @@ -167,15 +157,7 @@ var_name: IDENT { $$ = $1; } ; /* - * BASE_BACKUP ( option [ 'value' ] [, ...] ) - * - * We also still support the legacy syntax: - * - * BASE_BACKUP [LABEL '