minor code question: portal memory cxts
The memory context created at src/backend/utils/mmgr/portalmem.c:183
shares the name of the memory context created at portalmem.c:279 (they
are both called "PortalHeapMemory"). Is there a reason for this?
-Neil
Neil Conway <neilc@samurai.com> writes:
The memory context created at src/backend/utils/mmgr/portalmem.c:183
shares the name of the memory context created at portalmem.c:279 (they
are both called "PortalHeapMemory"). Is there a reason for this?
Copy-and-paste oversight I'd say. Probably the latter ought to be
"PortalHoldContext" or some such.
regards, tom lane
On Tue, 2004-10-12 at 09:40, Tom Lane wrote:
Copy-and-paste oversight I'd say. Probably the latter ought to be
"PortalHoldContext" or some such.
Thanks, that's what I suspected. I've applied the attached fix to HEAD.
-Neil
Attachments:
portal-mem-cntx-name-1.patchtext/x-patch; charset=iso-8859-1; name=portal-mem-cntx-name-1.patchDownload
Index: src/backend/utils/mmgr/portalmem.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/utils/mmgr/portalmem.c,v
retrieving revision 1.73
diff -c -r1.73 portalmem.c
*** src/backend/utils/mmgr/portalmem.c 16 Sep 2004 21:08:12 -0000 1.73
--- src/backend/utils/mmgr/portalmem.c 12 Oct 2004 01:46:14 -0000
***************
*** 278,284 ****
*/
portal->holdContext =
AllocSetContextCreate(PortalMemory,
! "PortalHeapMemory",
ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE,
ALLOCSET_DEFAULT_MAXSIZE);
--- 278,284 ----
*/
portal->holdContext =
AllocSetContextCreate(PortalMemory,
! "PortalHoldContext",
ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE,
ALLOCSET_DEFAULT_MAXSIZE);