Re: Using indexes for partial index builds - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Using indexes for partial index builds
Date
Msg-id CAM-w4HPuS-23hQK1UwWmHPDaFpUYO_ZHoeixjP3a9gg_R7rTgw@mail.gmail.com
Whole thread Raw
In response to Re: Using indexes for partial index builds  (Jim Nasby <jim@nasby.net>)
Responses Re: Using indexes for partial index builds  (Ants Aasma <ants@cybertec.at>)
List pgsql-hackers
On Thu, Mar 7, 2013 at 12:51 AM, Jim Nasby <jim@nasby.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



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: [v9.3] writable foreign tables
Next
From: Greg Stark
Date:
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]