pgsql: Flexible options for CREATE_REPLICATION_SLOT. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Flexible options for CREATE_REPLICATION_SLOT.
Date
Msg-id E1mXnha-0006KR-U1@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Flexible options for BASE_BACKUP.
Next
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Flexible options for BASE_BACKUP.