Re: GIN improvements part 1: additional information

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN improvements part 1: additional information
Date: 2013-12-19 13:33:36
Message-ID: 52B2F5B0.1030809@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/17/2013 12:49 AM, Heikki Linnakangas wrote:
> On 12/17/2013 12:22 AM, Alexander Korotkov wrote:
>> On Mon, Dec 16, 2013 at 3:30 PM, Heikki Linnakangas
>> <hlinnakangas(at)vmware(dot)com
>>> wrote:
>>
>>> On 12/12/2013 06:44 PM, Alexander Korotkov wrote:
>>>
>>> When values are packed into small groups, we have to either insert
>>>> inefficiently encoded value or re-encode whole right part of values.
>>>
>>> It would probably be simplest to store newly inserted items
>>> uncompressed,
>>> in a separate area in the page. For example, grow the list of
>>> uncompressed
>>> items downwards from pg_upper, and the compressed items upwards from
>>> pg_lower. When the page fills up, re-encode the whole page.
>
> I hacked together an implementation of a variant of Simple9, to see how
> it performs. Insertions are handled per the above scheme.

Here's an updated version of that, using the page layout without
item-indexes that I described in the other post. This is much less buggy
than that earlier crude version I posted - and unfortunately it doesn't
compress as well. The earlier version lost some items :-(.

Nevertheless, I think this page layout and code formatting is better,
even if we switch the encoding back to the varbyte encoding in the end.

I haven't tested WAL replay or VACUUM with this version yet, so those
are likely broken.

- Heikki

Attachment Content-Type Size
gin-packed-postinglists-simple8-segments-1.patch.gz application/x-gzip 28.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-12-19 13:37:00 Re: pg_rewarm status
Previous Message Cédric Villemain 2013-12-19 13:31:53 Re: SQL objects UNITs (was: Extension Templates S03E11)