SOLVED Re: [HACKERS] _penalty gist method invoked with one key NULL

2005-10-27 Thread Grzegorz Jaskiewicz
Sorry for all this crap, this is bullocks. reason was, one of internal functions didn't filled out length value, and since the type is variable length, we had trouble. Postgres wasn't copying anything, since length was 0, hence the NULL - >key. So here's little request. Could someone please put

Re: [HACKERS] _penalty gist method invoked with one key NULL

2005-10-27 Thread Grzegorz Jaskiewicz
Seems like decompress and compress were offending here, simply removing them from gist index create helped. But, I still get on explain analyze that seqscan was used, rather than gist. Even tho ~ operator is defined for gist, and that seqscan is set to false. On 2005-10-28, at 00:24, gj wro

Re: [HACKERS] _penalty gist method invoked with one key NULL

2005-10-27 Thread gj
Breakpoint 1, gistpenalty (giststate=0xbfc254e4, attno=0, key1=0xbfc252d4, isNull1=0 '\0', key2=0xbfc24fd4, isNull2=0 '\0', penalty=0xbfc24fb0) at gistutil.c:821 821 FunctionCall3(&giststate->penaltyFn[attno], (gdb) p key1 $1 = (GISTENTRY *) 0xbfc252d4 (gdb) p key1

Re: [HACKERS] _penalty gist method invoked with one key NULL

2005-10-27 Thread gj
Ok, Thanks for that. Script works great. Here's bt I get: #0 0xb7ef26a4 in ?? () #1 0xb7cae460 in _IO_list_all () from /lib/tls/libc.so.6 #2 0xb7ef2ea8 in ?? () #3 0x in ?? () #4 0x0844bebc in ?? () #5 0x in ?? () #6 0xb7cadff4 in ?? () from /lib/tls/libc.so.6 #7

Re: [HACKERS] _penalty gist method invoked with one key NULL

2005-10-27 Thread Tom Lane
Grzegorz Piotr Jaskiewicz <[EMAIL PROTECTED]> writes: > can I just run postgres, in non forking mode, on gdb? Just start a normal session and then attach to the backend process with gdb in a separate window. There's no reason to fool with a standalone backend for 99.99% of debugging problems. Wi

[HACKERS] _penalty gist method invoked with one key NULL

2005-10-27 Thread Grzegorz Piotr Jaskiewicz
As in subject. What it does, it gets through picksplit, I return good values, valid unions, etc. Than (I guess) postgres is trying to insert another value in tree, hence penalty is called. Why one of the values penalty is called with is NULL, and I have no idea if that's valid. >From all the e