Re: Using indexes for partial index builds

From: Greg Stark <stark(at)mit(dot)edu>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Paul Norman <penorman(at)mac(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Using indexes for partial index builds
Date: 2013-03-11 19:13:10
Message-ID: CAM-w4HPuS-23hQK1UwWmHPDaFpUYO_ZHoeixjP3a9gg_R7rTgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 7, 2013 at 12:51 AM, Jim Nasby <jim(at)nasby(dot)net> wrote:
> Something worth considering on this... I suspect it's possible to use an
> index-only scan to do this, regardless of whether the heap page is all
> visible. The reason is that the newly created index would just use the same
> access methodology as the original index, so any dead rows would be ignored.

This is actually quite clever. I wonder how many other cases can use
similar logic.

> We'd almost certainly need to block vacuums during the build however.
> Obviously not an issue for regular index builds, but it would be for
> concurrent ones.

Concurrent index builds block vacuums already.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-03-11 19:19:32 Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Previous Message Thom Brown 2013-03-11 19:07:14 Re: [v9.3] writable foreign tables