mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
we found a problem in GiST with massive insert/update operations
with many NULLs ( inserting of NULL into indexed field cause ERROR: MemoryContextAlloc: invalid request size) As a workaround 'vacuum analyze' could be used. This patch resolves the problem, please upply to 7.1.1 sources and current cvs tree. Oleg Bartunov
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.75 2001/05/15 03:49:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.76 2001/05/15 14:14:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1199,13 +1199,17 @@ gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
|
||||
gistentryinit(*e, pr, r, pg, o, b, l);
|
||||
if (giststate->haskeytype)
|
||||
{
|
||||
dep = (GISTENTRY *)
|
||||
DatumGetPointer(FunctionCall1(&giststate->decompressFn,
|
||||
if ( b ) {
|
||||
dep = (GISTENTRY *)
|
||||
DatumGetPointer(FunctionCall1(&giststate->decompressFn,
|
||||
PointerGetDatum(e)));
|
||||
gistentryinit(*e, dep->pred, dep->rel, dep->page, dep->offset, dep->bytes,
|
||||
gistentryinit(*e, dep->pred, dep->rel, dep->page, dep->offset, dep->bytes,
|
||||
dep->leafkey);
|
||||
if (dep != e)
|
||||
pfree(dep);
|
||||
if (dep != e)
|
||||
pfree(dep);
|
||||
} else {
|
||||
gistentryinit(*e, (char*)NULL, r, pg, o, 0, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user