]> granicus.if.org Git - postgresql/commit
Allow pg_create_physical_replication_slot() to reserve WAL.
authorAndres Freund <andres@anarazel.de>
Tue, 11 Aug 2015 10:34:31 +0000 (12:34 +0200)
committerAndres Freund <andres@anarazel.de>
Tue, 11 Aug 2015 10:34:31 +0000 (12:34 +0200)
commit6fcd88511f8e69e38defb1272e0042ef4bab2feb
tree5334ee3074cedde450ff688d26af4371c0d39c8b
parent093d0c83c1d210167d122da92459a0677e04ffc9
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@mail.gmail.com
doc/src/sgml/func.sgml
src/backend/catalog/system_views.sql
src/backend/replication/logical/logical.c
src/backend/replication/slot.c
src/backend/replication/slotfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/replication/slot.h