mirror of https://github.com/citusdata/citus.git
Fix isolation tester
parent
d5484d4e69
commit
34b17b1020
|
@ -131,11 +131,6 @@ start_session_level_connection_to_node(PG_FUNCTION_ARGS)
|
||||||
static void
|
static void
|
||||||
EstablishSingleConnnection(char *nodeNameString, int nodePort)
|
EstablishSingleConnnection(char *nodeNameString, int nodePort)
|
||||||
{
|
{
|
||||||
if (LocalConnectionContext != NULL)
|
|
||||||
{
|
|
||||||
MemoryContextDelete(LocalConnectionContext);
|
|
||||||
LocalConnectionContext = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalConnectionContext =
|
LocalConnectionContext =
|
||||||
AllocSetContextCreateExtended(ConnectionContext,
|
AllocSetContextCreateExtended(ConnectionContext,
|
||||||
|
@ -253,12 +248,19 @@ stop_session_level_connection_to_node(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
allowNonIdleRemoteTransactionOnXactHandling = false;
|
allowNonIdleRemoteTransactionOnXactHandling = false;
|
||||||
|
|
||||||
if (singleConnection != NULL)
|
if (LocalConnectionContext != NULL)
|
||||||
{
|
{
|
||||||
PQfinish(singleConnection->pgConn);
|
if (singleConnection != NULL)
|
||||||
singleConnection = NULL;
|
{
|
||||||
|
PQfinish(singleConnection->pgConn);
|
||||||
|
singleConnection = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
MemoryContextDelete(LocalConnectionContext);
|
||||||
|
LocalConnectionContext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PG_RETURN_VOID();
|
PG_RETURN_VOID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue