pgsql: Allow pg_create_physical_replication_slot() to reserve WAL.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow pg_create_physical_replication_slot() to reserve WAL.
Date: 2015-08-11 10:47:17
Message-ID: E1ZP75R-0006wl-Dp@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow pg_create_physical_replication_slot() to reserve WAL.

When creating a physical slot it's often useful to immediately reserve
the current WAL position instead of only doing after the first feedback
message arrives. That e.g. allows slots to guarantee that all the WAL
for a base backup will be available afterwards.

Logical slots already have to reserve WAL during creation, so generalize
that logic into being usable for both physical and logical slots.

Catversion bump because of the new parameter.

Author: Gurjeet Singh
Reviewed-By: Andres Freund
Discussion: CABwTF4Wh_dBCzTU=49pFXR6coR4NW1ynb+vBqT+Po=7fuq5iCw(at)mail(dot)gmail(dot)com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6fcd88511f8e69e38defb1272e0042ef4bab2feb

Modified Files
--------------
doc/src/sgml/func.sgml | 8 +++-
src/backend/catalog/system_views.sql | 7 +++
src/backend/replication/logical/logical.c | 47 +------------------
src/backend/replication/slot.c | 71 +++++++++++++++++++++++++++++
src/backend/replication/slotfuncs.c | 21 ++++++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +-
src/include/replication/slot.h | 1 +
8 files changed, 107 insertions(+), 52 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-08-11 10:47:19 pgsql: Minor cleanups in slot related code.
Previous Message Andrew Dunstan 2015-08-11 03:17:32 Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types.