mirror of https://github.com/citusdata/citus.git
Remove useless changing of CurrentMemoryContext.
parent
6291998ae1
commit
3286b99ff1
|
@ -163,7 +163,6 @@ StartNodeUserDatabaseConnection(uint32 flags, const char *hostname, int32 port,
|
||||||
ConnectionHashKey key;
|
ConnectionHashKey key;
|
||||||
ConnectionHashEntry *entry = NULL;
|
ConnectionHashEntry *entry = NULL;
|
||||||
MultiConnection *connection;
|
MultiConnection *connection;
|
||||||
MemoryContext oldContext;
|
|
||||||
bool found;
|
bool found;
|
||||||
|
|
||||||
/* do some minimal input checks */
|
/* do some minimal input checks */
|
||||||
|
@ -234,11 +233,8 @@ StartNodeUserDatabaseConnection(uint32 flags, const char *hostname, int32 port,
|
||||||
*/
|
*/
|
||||||
connection = StartConnectionEstablishment(&key);
|
connection = StartConnectionEstablishment(&key);
|
||||||
|
|
||||||
oldContext = MemoryContextSwitchTo(ConnectionContext);
|
|
||||||
dlist_push_tail(entry->connections, &connection->connectionNode);
|
dlist_push_tail(entry->connections, &connection->connectionNode);
|
||||||
|
|
||||||
MemoryContextSwitchTo(oldContext);
|
|
||||||
|
|
||||||
if (flags & SESSION_LIFESPAN)
|
if (flags & SESSION_LIFESPAN)
|
||||||
{
|
{
|
||||||
connection->sessionLifespan = true;
|
connection->sessionLifespan = true;
|
||||||
|
|
Loading…
Reference in New Issue