Re: GiST index on data types that require compression

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Blasby <dblasby(at)refractions(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GiST index on data types that require compression
Date: 2001-05-25 08:38:44
Message-ID: Pine.GSO.4.33.0105251133510.28483-100000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 25 May 2001, Tom Lane wrote:

> Dave Blasby <dblasby(at)refractions(dot)net> writes:
> > So far, it doesnt work. Only one of my GiST support functions is called
> > (the compress function), after that I get the error message:
> > # create index qq on tp3 using gist (the_geom gist_geometry_ops) with
> > (islossy);
> > ERROR: index_formtuple: data takes 8424504 bytes, max is 8191
>
> It looks like the GIST code expects your compress function to give back
> a varlena datatype, not the fixed-length type you are actually handing
> back. The ridiculous length comes from interpreting the first word
> of your BOX3D as a length.
>
> There are/were provisions in the GIST code for having the compress
> function emit a different datatype than it takes in, but I think they
> are incomplete or broken. Might be easiest to produce a varlena result
> for now.

compress fully supports fixed-length and varlena types. The problem is
index_formtuple - types of key and column could be different
(example - polygon, where column has varlena type but key is fixed-length)
As a workaround one could use the samy type for key and column.
1st integer field in strcuture BOX3D should be length of this structure
in bytes.

Tom, do you have an idea how to fix this problem ?

Oleg
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew Kirkwood 2001-05-25 09:21:01 Re: Re: Shared memory for RH Linux 7.1
Previous Message Zeugswetter Andreas SB 2001-05-25 07:44:14 AW: Plans for solving the VACUUM problem