pgsql: Flexible options for CREATE_REPLICATION_SLOT.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Flexible options for CREATE_REPLICATION_SLOT.
Date: 2021-10-05 16:54:02
Message-ID: E1mXnha-0006KR-U1@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Flexible options for CREATE_REPLICATION_SLOT.

Like BASE_BACKUP, CREATE_REPLICATION_SLOT has historically used a
hard-coded syntax. To improve future extensibility, adopt a flexible
options syntax here, too.

In the new syntax, instead of three mutually exclusive options
EXPORT_SNAPSHOT, USE_SNAPSHOT, and NOEXPORT_SNAPSHOT, there is now a single
SNAPSHOT option with three possible values: 'export', 'use', and 'nothing'.

This commit does not remove support for the old syntax. It just adds
the new one as an additional option, makes pg_receivewal,
pg_recvlogical, and walreceiver processes use it.

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

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/0266e98c6b865246c3031bbf55cb15f330134e30

Modified Files
--------------
doc/src/sgml/protocol.sgml | 37 +++++++++----
.../libpqwalreceiver/libpqwalreceiver.c | 61 +++++++++++++++++-----
src/backend/replication/repl_gram.y | 35 +++++++------
src/backend/replication/walsender.c | 40 +++++++-------
src/bin/pg_basebackup/streamutil.c | 40 +++++++++++---
5 files changed, 150 insertions(+), 63 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-10-05 18:33:17 Re: pgsql: Flexible options for BASE_BACKUP.
Previous Message Robert Haas 2021-10-05 15:54:23 pgsql: Flexible options for BASE_BACKUP.