X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B6ACAD1E129 for ; Thu, 15 Apr 2004 00:53:20 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 32373-01 for ; Thu, 15 Apr 2004 00:53:17 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A4A39D1D903 for ; Thu, 15 Apr 2004 00:53:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3F3rCBV011511; Wed, 14 Apr 2004 23:53:13 -0400 (EDT) To: "John Hagstrand" Cc: pgsql-general@postgresql.org, Paul Ramsey , postgis-users@postgis.refractions.net Subject: Re: ERROR: invalid memory alloc request size 0 In-reply-to: References: Comments: In-reply-to "John Hagstrand" message dated "Wed, 14 Apr 2004 21:40:42 -0500" Date: Wed, 14 Apr 2004 23:53:12 -0400 Message-ID: <11510.1082001192@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/511 X-Sequence-Number: 59753 "John Hagstrand" 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