[HACKERS] TOAST issue on custom index access method

2010-06-24 Thread Carsten Kropf
Hi *, I have a strange issue using a custom built index structure. My index access method support document type composed of words (as tsvector) and points (1-dimensional arrays of them). For internal reasons, I have to save the documents as a whole inside my structure (for proper

Re: [HACKERS] TOAST issue on custom index access method

2010-06-24 Thread Tom Lane
Carsten Kropf ckro...@fh-hof.de writes: I have a strange issue using a custom built index structure. My index access method support document type composed of words (as tsvector) and points (1-dimensional arrays of them). For internal reasons, I have to save the documents as a whole inside

Re: [HACKERS] TOAST issue on custom index access method

2010-06-24 Thread Carsten Kropf
Oh, thanks. I didn't know about index tables not having access to associated toast values. The index access method is (at least in the textual part) similar to GIN, however, I needed to do some changes to it. Saving the whole document is actually only important for vacuum. I think, I will find

Re: [HACKERS] TOAST issue on custom index access method

2010-06-24 Thread Tom Lane
Carsten Kropf ckro...@fh-hof.de writes: However, it is a little bit strange, that I get toasted values (when inserting from another table) and untoasted values, if I insert items directly. Could anybody please explain this to me? Huh? An index will never ever get passed an

Re: [HACKERS] TOAST issue on custom index access method

2010-06-24 Thread Carsten Kropf
Hmm, k, then I don't know exactly what happens. I have some values in my composite type. The size of the index tuple (if coming from one table and being copied to the target table) is about 15x bytes. Otherwise, if I insert the same tuple directly, it is about 12kb. So, I don't know exactly