1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

First cut at recycling space in btree indexes. Still some rough edges

to fix, but it seems to basically work...
This commit is contained in:
Tom Lane
2003-02-23 06:17:13 +00:00
parent 27854915b9
commit 88dc31e3f2
8 changed files with 745 additions and 32 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.63 2002/11/13 00:39:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.64 2003/02/23 06:17:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -394,17 +394,16 @@ nocache_index_getattr(IndexTuple tup,
}
/*
* Copies source into target. If *target == NULL, we palloc space; otherwise
* we assume we have space that is already palloc'ed.
* Create a palloc'd copy of an index tuple.
*/
void
CopyIndexTuple(IndexTuple source, IndexTuple *target)
IndexTuple
CopyIndexTuple(IndexTuple source)
{
IndexTuple result;
Size size;
size = IndexTupleSize(source);
if (*target == NULL)
*target = (IndexTuple) palloc(size);
memmove((char *) *target, (char *) source, size);
result = (IndexTuple) palloc(size);
memcpy(result, source, size);
return result;
}