Re: Fix for Index Advisor related hooks - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Fix for Index Advisor related hooks
Date
Msg-id 4D5A7E8A.9010008@enterprisedb.com
Whole thread Raw
In response to Fix for Index Advisor related hooks  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Responses Re: Fix for Index Advisor related hooks
List 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


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Add support for logging the current role
Next
From: Stephen Frost
Date:
Subject: Re: ALTER TYPE 2: skip already-provable no-work rewrites