mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Create infrastructure for 'MinimalTuple' representation of in-memory
tuples with less header overhead than a regular HeapTuple, per my recent proposal. Teach TupleTableSlot code how to deal with these. As proof of concept, change tuplestore.c to store MinimalTuples instead of HeapTuples. Future patches will expand the concept to other places where it is useful.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.101 2006/03/05 15:58:40 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.102 2006/06/27 02:51:39 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -911,21 +911,17 @@ RunFromStore(Portal portal, ScanDirection direction, long count,
|
||||
for (;;)
|
||||
{
|
||||
MemoryContext oldcontext;
|
||||
HeapTuple tup;
|
||||
bool should_free;
|
||||
bool ok;
|
||||
|
||||
oldcontext = MemoryContextSwitchTo(portal->holdContext);
|
||||
|
||||
tup = tuplestore_getheaptuple(portal->holdStore, forward,
|
||||
&should_free);
|
||||
ok = tuplestore_gettupleslot(portal->holdStore, forward, slot);
|
||||
|
||||
MemoryContextSwitchTo(oldcontext);
|
||||
|
||||
if (tup == NULL)
|
||||
if (!ok)
|
||||
break;
|
||||
|
||||
ExecStoreTuple(tup, slot, InvalidBuffer, should_free);
|
||||
|
||||
(*dest->receiveSlot) (slot, dest);
|
||||
|
||||
ExecClearTuple(slot);
|
||||
|
Reference in New Issue
Block a user