aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/proc.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2016-12-08 12:00:00 -0500
committerPeter Eisentraut <peter_e@gmx.net>2016-12-12 08:38:17 -0500
commita924c327e2793d2025b19e18de7917110dc8afd8 (patch)
tree2a81b0fd87cf4efb98a9a05aa3c27e8c8767bba3 /src/backend/storage/lmgr/proc.c
parente7f051b8f9a6341f6d3bf80b29c1dbc1837be9ab (diff)
downloadpostgresql-a924c327e2793d2025b19e18de7917110dc8afd8.tar.gz
postgresql-a924c327e2793d2025b19e18de7917110dc8afd8.zip
Add support for temporary replication slots
This allows creating temporary replication slots that are removed automatically at the end of the session or on error. From: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r--src/backend/storage/lmgr/proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 83e9ca15d18..276261bd7b3 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -810,6 +810,9 @@ ProcKill(int code, Datum arg)
if (MyReplicationSlot != NULL)
ReplicationSlotRelease();
+ /* Also cleanup all the temporary slots. */
+ ReplicationSlotCleanup();
+
/*
* Detach from any lock group of which we are a member. If the leader
* exist before all other group members, it's PGPROC will remain allocated