Hi all,
I noticed that in postgres 10beta3, calling pg_drop_replication_slot on an
active slot will block until it's released instead of returning an error
like
done in pg 9.6. Since this is a change in the previous behavior and the docs
wasn't changed I made a patch to restore the previous behavior.
Thanks,
Simone.
--
after git commit 9915de6c1cb calls to pg_drop_replication_slot or the
replication protocol DROP_REPLICATION_SLOT command will block when a
slot is in use instead of returning an error as before (as the doc
states).
This patch will set nowait to true to restore the previous
behavior.
diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c
index d4cbd83bde..ab776e85d2 100644
--- a/src/backend/replication/slotfuncs.c
+++ b/src/backend/replication/slotfuncs.c
@@ -171,7 +171,7 @@ pg_drop_replication_slot(PG_FUNCTION_ARGS)
CheckSlotRequirements();
- ReplicationSlotDrop(NameStr(*name), false);
+ ReplicationSlotDrop(NameStr(*name), true);
PG_RETURN_VOID();
}
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 03e1cf44de..c6b40ec0fb 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1028,7 +1028,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
static void
DropReplicationSlot(DropReplicationSlotCmd *cmd)
{
- ReplicationSlotDrop(cmd->slotname, false);
+ ReplicationSlotDrop(cmd->slotname, true);
EndCommand("DROP_REPLICATION_SLOT", DestRemote);
}
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers