Remove useless changing of CurrentMemoryContext.

pull/1104/head
Andres Freund 2017-01-02 03:57:35 -08:00
parent 6291998ae1
commit 3286b99ff1
1 changed files with 0 additions and 4 deletions

View File

@ -163,7 +163,6 @@ StartNodeUserDatabaseConnection(uint32 flags, const char *hostname, int32 port,
ConnectionHashKey key;
ConnectionHashEntry *entry = NULL;
MultiConnection *connection;
MemoryContext oldContext;
bool found;
/* do some minimal input checks */
@ -234,11 +233,8 @@ StartNodeUserDatabaseConnection(uint32 flags, const char *hostname, int32 port,
*/
connection = StartConnectionEstablishment(&key);
oldContext = MemoryContextSwitchTo(ConnectionContext);
dlist_push_tail(entry->connections, &connection->connectionNode);
MemoryContextSwitchTo(oldContext);
if (flags & SESSION_LIFESPAN)
{
connection->sessionLifespan = true;