aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.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/tcop/postgres.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/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index cc847548a9f..b17923106a6 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3878,6 +3878,9 @@ PostgresMain(int argc, char *argv[],
if (MyReplicationSlot != NULL)
ReplicationSlotRelease();
+ /* We also want to cleanup temporary slots on error. */
+ ReplicationSlotCleanup();
+
/*
* Now return to normal top-level context and clear ErrorContext for
* next time.