"John Hagstrand" <john.hagstrand@interageresearch.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