*/portal->holdStore =tuplestore_begin_heap(true,true, work_mem); MemoryContextSwitchTo(oldcxt); } 开发者ID:CraigBryan,项目名称:PostgresqlFun,代码行数:31,代码来源:portalmem.c 示例2: deflist_to_tuplestore ▲点赞 5▼ /* * deflist_to_tuplestore - Helper function to convert DefElem list ...
void PortalCreateHoldStore(Portal portal) { MemoryContext oldcxt; portal->holdContext = AllocSetContextCreate(TopPortalContext, "PortalHoldContext", ALLOCSET_DEFAULT_SIZES); oldcxt = MemoryContextSwitchTo(portal->holdContext); portal->holdStore = tuplestore_begin_heap(portal->cursorOptions & CURSOR...
> I was looking at the tuplestore.c code a few days ago and noticed that > it allocates tuples in the memory context that tuplestore_begin_heap() > is called in, which for nodeMaterial.c, is ExecutorState. > > I didn't think this was great because: > 1. Allocating many chunks ...
I was looking at the tuplestore.c code a few days ago and noticed that it allocates tuples in the memory context that tuplestore_begin_heap() is called in, which for nodeMaterial.c, is ExecutorState. I didn't think this was great because: 1. Allocating many chunks in ExecutorState c...
scan = heap_beginscan(brokers, GetTransactionSnapshot(),0,NULL);while((tup = heap_getnext(scan, ForwardScanDirection)) !=NULL) {char*host; Datum d;boolisnull;ExecStoreTuple(tup, slot, InvalidBuffer,false); d = slot_getattr(slot, BROKER_ATTR_HOST, &isnull); ...
==25520== Uninitialised value was created by a heap allocation ==25520== at 0x8FB780: palloc (mcxt.c:1340) ==25520== by 0x913067: tuplestore_begin_common (tuplestore.c:289) ==25520== by 0x91310B: tuplestore_begin_heap (tuplestore.c:331) ...