Re: Fix for Index Advisor related hooks

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix for Index Advisor related hooks
Date: 2011-02-15 13:24:26
Message-ID: 4D5A7E8A.9010008@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11.02.2011 22:44, Gurjeet Singh wrote:
> Looks like the function get_actual_variable_range() was written with the
> knowledge that virtual/hypothetical indexes may exist, but the assumption
> seems wrong.
>
> One one hand get_actual_variable_range() expects that virtual indexes do not
> have an OID assigned, on the other hand explain_get_index_name_hook() is
> handed just an index's OID to get its name back; IMHO these are based on two
> conflicting assumptions about whether a virtual index will have an OID
> assigned.
>
> Attached patch fix_get_actual_variable_range.patch tries to fix this by
> introducing a new hook that can help Postgres decide if an index is
> fictitious or not.

The new hook takes an index oid as argument, so I gather that you
resolved the contradiction by deciding that fictitious indexes have
OIDs. How do you assign those OIDs? Do fictitious indexes have entries
in pg_index?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2011-02-15 13:24:37 Re: ALTER TYPE 2: skip already-provable no-work rewrites
Previous Message Stephen Frost 2011-02-15 13:09:03 Re: Add support for logging the current role