WIP: store additional info in GIN index - Mailing list pgsql-hackers

From Alexander Korotkov
Subject WIP: store additional info in GIN index
Date
Msg-id CAPpHfdtSt47PpRQBK6OawHePLJk8PF-wNhswaUpre7_+cc_kmA@mail.gmail.com
Whole thread Raw
Responses Re: WIP: store additional info in GIN index  (Tomas Vondra <tv@fuzzy.cz>)
Re: WIP: store additional info in GIN index  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hackers,

Attached patch enables GIN to store additional information with item pointers in posting lists and trees.
Such additional information could be positions of words, positions of trigrams, lengths of arrays and so on.
This is the first and most huge patch of serie of GIN improvements which was presented at PGConf.EU

Patch modifies GIN interface as following:
1) Two arguments are added to extractValue
Datum **addInfo, bool **addInfoIsNull
2) Two arguments are added to consistent
Datum addInfo[], bool addInfoIsNull[]
3) New method config is introduced which returns datatype oid of addtional information (analogy with SP-GiST config method).

Patch completely changes storage in posting lists and leaf pages of posting trees. It uses varbyte encoding for BlockNumber and OffsetNumber. BlockNumber are stored incremental in page. Additionally one bit of OffsetNumber is reserved for additional information NULL flag. To be able to find position in leaf data page quickly patch introduces small index in the end of page.

------
With best regards,
Alexander Korotkov.
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Avoiding overflow in timeout-related calculations
Next
From: Tomas Vondra
Date:
Subject: Re: autovacuum stress-testing our system