Re: Index-only quals

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index-only quals
Date: 2010-02-23 17:11:37
Message-ID: 201002231711.o1NHBbZ17363@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I added this URL to the existing TODO item.

---------------------------------------------------------------------------

Heikki Linnakangas wrote:
> Here is an updated version of my patch to return data from b-tree
> indexes, and use it to satisfy quals.
>
> I added a new column 'amregurgitate' to pg_am, to mark which indexams
> can return index tuples. Also, the data type of the index column in
> pg_attribute must match the type of the heap column - this catches the
> hack that 'name' is stored as cstring, that I had hardcoded before.
>
> As discussed, GiST/GIN would need more infrastructure to mark which
> opclasses can return tuples, but as long as GiST/GIN doesn't support
> regurgitation at all, I'm not going to complicate the catalogs with that.
>
> There's also some planner fixes - indexes that are only useful because
> of index-only quals are not considered for bitmap scans, and volatile
> expressions mustn't be used as index-only quals.
>
>
> This patch comes in two parts. Indexam API changes, which just splits
> the indexam_getnext function into two without providing any new
> functionality, and the main patch that applies on top of the indexam API
> changes. The patches are also available at
> git://git.postgresql.org/git/users/heikki/postgres.git, branches
> 'indexam-api-changes and 'indexfilter'.
>
> Barring objections, I'm going to apply the indexam API changes part,
> since that simplifies the code in question regardless of the rest of the
> work. I'm pretty happy now with the indexfilter patch as well, but want
> to do some more testing on that before committing. Some more eyeballs
> would be appreciated as well.
>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com

>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-02-23 17:45:09 pg_stop_backup does not complete
Previous Message Kevin Grittner 2010-02-23 16:52:36 Re: function side effects