summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMason Sharp2015-03-04 01:50:33 +0000
committerPavan Deolasee2015-04-15 05:49:16 +0000
commit15134def1fc48a005f72ad173f7a295660d92372 (patch)
tree836c250e5b306740897583a062b17e345b6d1170 /src
parent94cf23fc9b4229b427d63cbf7acaeb3cea245bc4 (diff)
If there was an error with prepared transactions, do
not try to reuse the connections and release them instead.
Diffstat (limited to 'src')
-rw-r--r--src/backend/pgxc/pool/execRemote.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c
index 604cccc8e3..e42a99d8a3 100644
--- a/src/backend/pgxc/pool/execRemote.c
+++ b/src/backend/pgxc/pool/execRemote.c
@@ -3139,7 +3139,6 @@ prepare_err:
conn->ck_resp_rollback = false;
/* sanity checks */
Assert(conn->sock != NO_SOCKET);
- Assert(conn->transaction_status == 'I');
Assert(conn->state == DN_CONNECTION_STATE_IDLE);
/* Send down abort prepared command */
if (pgxc_node_send_gxid(conn, auxXid))
@@ -3180,7 +3179,6 @@ prepare_err:
conn->ck_resp_rollback = false;
/* sanity checks */
Assert(conn->sock != NO_SOCKET);
- Assert(conn->transaction_status = 'I');
Assert(conn->state = DN_CONNECTION_STATE_IDLE);
/* Send down abort prepared command */
if (pgxc_node_send_gxid(conn, auxXid))
@@ -3222,6 +3220,13 @@ prepare_err:
CloseCombiner(&combiner2);
}
+ if (!temp_object_included && !PersistentConnections)
+ {
+ /* Clean up remote sessions */
+ pgxc_node_remote_cleanup_all();
+ release_handles();
+ }
+
pfree_pgxc_all_handles(handles);
/*