pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Flexible options for BASE_BACKUP.
Date: Tue, 05 Oct 2021 15:54:23 +0000
Message-ID: <E1mXmlr-00060n-H7@gemulon.postgresql.org> (raw)

Flexible options for BASE_BACKUP.

Previously, BASE_BACKUP used an entirely hard-coded syntax, but that's
hard to extend. Instead, adopt the same kind of syntax we've used for
SQL commands such as VACUUM, ANALYZE, COPY, and EXPLAIN, where it's
not necessary for all of the option names to be parser keywords.

In the new syntax, most of the options now take an optional Boolean
argument. To match our practice in other in places, the options which
the old syntax called NOWAIT and NOVERIFY_CHECKSUMS options are in the
new syntax called WAIT and VERIFY_CHECKUMS, and the default value is
false. In the new syntax, the FAST option has been replaced by a
CHECKSUM option whose value may be 'fast' or 'spread'.

This commit does not remove support for the old syntax. It just adds
the new one as an additional option, and makes pg_basebackup prefer
the new syntax when the server is new enough to support it.

Patch by me, reviewed and tested by Fabien Coelho, Sergei Kornilov,
Fujii Masao, and Tushar Ahuja.

Discussion: http://postgr.es/m/CA+TgmobAczXDRO_Gr2euo_TxgzaH1JxbNxvFx=HYvBinefNH8Q@mail.gmail.com
Discussion: http://postgr.es/m/CA+TgmoZGwR=ZVWFeecncubEyPdwghnvfkkdBe9BLccLSiqdf9Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0ba281cb4bf9f5f65529dfa4c8282abb734dd454

Modified Files
--------------
doc/src/sgml/protocol.sgml            | 67 ++++++++++++++----------
src/backend/replication/basebackup.c  | 51 +++++++++++-------
src/backend/replication/repl_gram.y   | 97 ++++++++++++++++++++++++++++++-----
src/bin/pg_basebackup/pg_basebackup.c | 71 ++++++++++++++++---------
src/bin/pg_basebackup/streamutil.c    | 61 ++++++++++++++++++++++
src/bin/pg_basebackup/streamutil.h    | 12 +++++
6 files changed, 276 insertions(+), 83 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1mXmlr-00060n-H7@gemulon.postgresql.org>
Permalink:  ../E1mXmlr-00060n-H7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mXmlr-00060n-H7@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Flexible options for BASE_BACKUP.
  In-Reply-To: <E1mXmlr-00060n-H7@gemulon.postgresql.org>
  References: <E1mXmlr-00060n-H7@gemulon.postgresql.org>

* 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