From be7161566db247fd519e1a888ea8cd36b3c72088 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera
Date: Fri, 1 Sep 2017 13:44:14 +0200
Subject: Add a WAIT option to DROP_REPLICATION_SLOT
Commit 9915de6c1cb2 changed the default behavior of
DROP_REPLICATION_SLOT so that it would wait until any session holding
the slot active would release it, instead of raising an error. But
users are already depending on the original behavior, so revert to it by
default and add a WAIT option to invoke the new behavior.
Per complaint from Simone Gotti, in
Discussion: https://postgr.es/m/CAEvsy6Wgdf90O6pUvg2wSVXL2omH5OPC-38OD4Zzgk-FXavj3Q@mail.gmail.com
---
doc/src/sgml/logicaldecoding.sgml | 2 +-
doc/src/sgml/protocol.sgml | 17 ++++++++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
(limited to 'doc/src')
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 8dcfc6c7424..f8142518c15 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -303,7 +303,7 @@ $ pg_recvlogical -d postgres --slot test --drop-slot
- DROP_REPLICATION_SLOT slot_name
+ DROP_REPLICATION_SLOT slot_name WAIT> >
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 7c012f59a3e..2bb4e38a9db 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -2173,13 +2173,13 @@ The commands accepted in walsender mode are:
- DROP_REPLICATION_SLOT slot_name>
+
+ DROP_REPLICATION_SLOT slot_name> WAIT>
DROP_REPLICATION_SLOT
- Drops a replication slot, freeing any reserved server-side resources. If
- the slot is currently in use by an active connection, this command fails.
+ Drops a replication slot, freeing any reserved server-side resources.
If the slot is a logical slot that was created in a database other than
the database the walsender is connected to, this command fails.
@@ -2192,6 +2192,17 @@ The commands accepted in walsender mode are:
+
+
+ WAIT
+
+
+ This option causes the command to wait if the slot is active until
+ it becomes inactive, instead of the default behavior of raising an
+ error.
+
+
+
--
cgit v1.2.3