Re: ERROR: invalid memory alloc request size 0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "John Hagstrand" <john(dot)hagstrand(at)interageresearch(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Paul Ramsey <pramsey(at)refractions(dot)net>, postgis-users(at)postgis(dot)refractions(dot)net
Subject: Re: ERROR: invalid memory alloc request size 0
Date: 2004-04-15 03:53:12
Message-ID: 11510.1082001192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"John Hagstrand" <john(dot)hagstrand(at)interageresearch(dot)com> writes:
> Here is a more detailed backtrace.

> (gdb) bt
> #0 errfinish (dummy=0) at elog.c:319
> #1 0x081a85de in elog_finish (elevel=20,
> fmt=0x8231d80 "invalid memory alloc request size %lu") at elog.c:853
> #2 0x081b3dd6 in MemoryContextAlloc (context=0x9f10598, size=0) at
> mcxt.c:482
> #3 0x0807411d in gistSplit (r=0xbe9a1938, buffer=805, itup=0x9f25128,
> len=0xbfec3eac, giststate=0xbfec4070, res=0xbfec402c) at gist.c:1348

Okay, this makes it pretty clear that the problem is the picksplit
function is setting v.spl_nleft to zero. In other words it's failed
to "split" the page at all (everything in the original index page has
gone into the righthand child). This seems to me to be necessarily
a bug in the index opclass's picksplit function.

You previously said that the column in question is a PostGIS Geometry
column, so I'm of the opinion this is a PostGIS bug. (Paul, any
suggestions about how to probe deeper?)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-04-15 04:09:00 Re: performance problem aftrer update from 7.1 to 7.4.2
Previous Message John Hagstrand 2004-04-15 02:40:42 Re: ERROR: invalid memory alloc request size 0