From: Peter Eisentraut Date: Fri, 6 Apr 2018 16:34:15 +0000 (-0400) Subject: Add memory context identifier to portal context X-Git-Url: http://git.postgresql.org/gitweb/-?a=commitdiff_plain;h=94c1f9ba11d1241a2b3b2be7177604b26b08bc3d;p=users%2Frhaas%2Fpostgres.git Add memory context identifier to portal context Discussion: https://www.postgresql.org/message-id/6421.1522194949@sss.pgh.pa.us --- diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 4307f5cc70..53225d6f1b 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -220,6 +220,9 @@ CreatePortal(const char *name, bool allowDup, bool dupSilent) /* put portal in table (sets portal->name) */ PortalHashTableInsert(portal, name); + /* reuse portal->name copy */ + MemoryContextSetIdentifier(portal->portalContext, portal->name); + return portal; }