aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql-repmgr/files/patch-repmgrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'databases/postgresql-repmgr/files/patch-repmgrd.c')
-rw-r--r--databases/postgresql-repmgr/files/patch-repmgrd.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/databases/postgresql-repmgr/files/patch-repmgrd.c b/databases/postgresql-repmgr/files/patch-repmgrd.c
new file mode 100644
index 000000000000..1c2ae8fb41f5
--- /dev/null
+++ b/databases/postgresql-repmgr/files/patch-repmgrd.c
@@ -0,0 +1,16 @@
+--- repmgrd.c 2010-12-06 05:09:48.000000000 +0300
++++ repmgrd.c 2011-01-16 12:34:49.345998423 +0300
+@@ -173,7 +173,12 @@
+ }
+
+ /* close the connection to the database and cleanup */
+- CloseConnections();
++ if (PQisBusy(primaryConn) == 1)
++ CancelQuery();
++ if (myLocalConn != NULL)
++ PQfinish(myLocalConn);
++ if (primaryConn != NULL && myLocalMode != PRIMARY_MODE)
++ PQfinish(primaryConn);
+
+ return 0;
+ }