Re: compress method for spgist - 2
От | Heikki Linnakangas |
---|---|
Тема | Re: compress method for spgist - 2 |
Дата | |
Msg-id | 54993A76.7050308@vmware.com обсуждение исходный текст |
Ответ на | Re: compress method for spgist - 2 (Teodor Sigaev <teodor@sigaev.ru>) |
Ответы |
Re: compress method for spgist - 2
Re: compress method for spgist - 2 |
Список | pgsql-hackers |
On 12/16/2014 07:48 PM, Teodor Sigaev wrote: > /* > * This struct is what we actually keep in index->rd_amcache. It includes > * static configuration information as well as the lastUsedPages cache. > */ > typedef struct SpGistCache > { > spgConfigOut config; /* filled in by opclass config method */ > > SpGistTypeDesc attType; /* type of input data and leaf values */ > SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */ > SpGistTypeDesc attLabelType; /* type of node label values */ > > SpGistLUPCache lastUsedPages; /* local storage of last-used info */ > } SpGistCache; Now that the input data type and leaf data type can be different, which one is "attType"? It's the leaf data type, as the patch stands. I renamed that to attLeafType, and went fixing all the references to it. In most places it's just a matter of search & replace, but what about the reconstructed datum? In freeScanStackEntry, we assume that att[Leaf]Type is the datatype for reconstructedValue, but I believe assume elsewhere that reconstructedValue is of the same data type as the input. At least if the opclass supports index-only scans. I think we'll need a separate SpGistTypeDesc for the input type. Or perhaps a separate SpGistTypeDesc for the reconstructed value and an optional decompress method to turn the reconstructedValue back into an actual reconstructed input datum. Or something like that. Attached is a patch with the kibitzing I did so far. - Heikki
Вложения
В списке pgsql-hackers по дате отправления: