Re: Win32 GiST bug - more info

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mark Cave-Ayland" <m(dot)cave-ayland(at)webbased(dot)co(dot)uk>
Cc: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: Win32 GiST bug - more info
Date: 2004-05-26 16:02:13
Message-ID: 8337.1085587333@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

"Mark Cave-Ayland" <m(dot)cave-ayland(at)webbased(dot)co(dot)uk> writes:
> Thanks for your reply. I found that I got a "better" backtrace by
> executing a couple of commands in the psql.exe session before creating
> the index. The improved backtrace was given below:

Ah, I think I know the problem: you haven't updated your code to conform
to the recently-revised API for GIST index support functions. You need
to look at these diffs:

2004-03-30 10:45 teodor

* contrib/btree_gist/btree_common.c,
contrib/btree_gist/btree_gist.h,
contrib/btree_gist/btree_gist.sql.in,
contrib/btree_gist/btree_num.c.in, contrib/btree_gist/btree_ts.c,
contrib/cube/cube.c, contrib/cube/cube.sql.in,
contrib/intarray/_int.sql.in, contrib/intarray/_int_gist.c,
contrib/intarray/_intbig_gist.c, contrib/ltree/_ltree_gist.c,
contrib/ltree/ltree.sql.in, contrib/ltree/ltree_gist.c,
contrib/rtree_gist/rtree_gist.c,
contrib/rtree_gist/rtree_gist.sql.in, contrib/seg/seg.c,
contrib/seg/seg.sql.in, contrib/tsearch/gistidx.c,
contrib/tsearch/tsearch.sql.in, contrib/tsearch2/gistidx.c,
contrib/tsearch2/tsearch.sql.in, contrib/tsearch2/untsearch.sql.in,
src/backend/access/gist/gist.c, src/include/access/gist.h: Cleanup
vectors of GISTENTRY and eliminate problem with 64-bit
strict-aligned boxes. Change interface to user-defined GiST support
methods union and picksplit. Now instead of bytea struct it used
special GistEntryVector structure.

There should be some discussion in the pgsql-hackers archives, too.

I think the direct cause of the crash is you're computing the wrong
number of elements in the passed GISTENTRY vector and iterating off the
end of the actually allocated vector.

regards, tom lane

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message De_Spike 2004-05-26 19:57:13 Primary Key results in endless loop
Previous Message Mark Cave-Ayland 2004-05-26 13:54:44 Re: Win32 GiST bug - more info