Re: Fast insertion indexes: why no developments

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Leonardo Francalanci <m_lists(at)yahoo(dot)it>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fast insertion indexes: why no developments
Date: 2013-10-30 18:40:13
Message-ID: CAGTBQpYsjMsYoAPWzs4SfWXvtPYD46oaiO4mbAquVnA-zi1A6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 30, 2013 at 10:53 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:

> LSM-tree also covers the goal of maintaining just 2 sub-trees and a
> concurrent process of merging sub-trees. That sounds like it would
> take a lot of additional time to get right and would need some
> off-line process to perform the merge.
>

Not necessarily.

Merging means applying insertions/deletions from one subtree to another.
While it's normally preferable and more efficient to do it in batches, I've
successfully implemented in-memory versions that use other writers to
perform the task, amortizing the cost of merging across many operations. In
essence, when there's a need to merge two subtrees, an inserting process
also merges one entry, so slowly trees get merged. That works in-memory
very well, it's quite clear that it's not necessarily generalizable to
external storage, but it's a technique to have in mind.

Alternatively, vacuum could do it. It's quite clearly a vacuuming task
anyway.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-10-30 18:50:18 Re: [PATCH] Use MAP_HUGETLB where supported (v3)
Previous Message Gavin Flower 2013-10-30 18:38:00 Re: Fast insertion indexes: why no developments