Re: brin autosummarization -- autovacuum "work items"

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: brin autosummarization -- autovacuum "work items"
Date: 2017-03-01 05:06:30
Message-ID: CAEepm=0FSzkxdCMMX8xR6NcAH6QZL8xkbyjTo6YAVHDPcLdHgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 1, 2017 at 5:58 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> I think one of the most serious issues with BRIN indexes is how they
> don't get updated automatically as the table is filled. This patch
> attempts to improve on that. During brininsert() time, we check whether
> we're inserting the first item on the first page in a range. If we are,
> request autovacuum to do a summarization run on that table. This is
> dependent on a new reloption for BRIN called "autosummarize", default
> off.

Nice.

> The way the request works is that autovacuum maintains a DSA which can
> be filled by backends with "work items". Currently, work items can
> specify a BRIN summarization of some specific index; in the future we
> could use this framework to request other kinds of things that do not
> fit in the "dead tuples / recently inserted tuples" logic that autovac
> currently uses to decide to vacuum/analyze tables.
>
> However, it seems I have not quite gotten the hang of DSA just yet,
> because after a couple of iterations, crashes occur. I think the reason
> has to do with either a resource owner clearing the DSA at an unwelcome
> time, or perhaps there's a mistake in my handling of DSA "relative
> pointers" stuff.

Ok, I'll take a look. It's set up for ease of use in short lifespan
situations like parallel query, and there are a few extra hoops to
jump through for longer lived DSA areas.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kuntal Ghosh 2017-03-01 05:09:11 Re: Performance degradation in TPC-H Q18
Previous Message Rushabh Lathia 2017-03-01 05:00:09 Re: [POC] hash partitioning