From: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Fix for Index Advisor related hooks |
Date: | 2011-02-11 20:44:22 |
Message-ID: | AANLkTikHUBrx5o==7O1Tk7i+Jnhrox3yh+j0igcbYU--@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
Also attached is the patch expose_IndexSupportInitialize.patch, that makes
the static function IndexSupportInitialize() global so that the Index
Advisor doesn't have to reinvent the wheel to prepare an index structure
with opfamilies and opclasses.
Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.EnterpriseDB.com
singh(dot)gurjeet(at){ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet
Mail sent from my BlackLaptop device
Attachment | Content-Type | Size |
---|---|---|
fix_get_actual_variable_range.patch | text/x-patch | 1.7 KB |
expose_IndexSupportInitialize.patch | text/x-patch | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2011-02-11 20:46:09 | Re: Sorting. When? |
Previous Message | Jeff Davis | 2011-02-11 20:40:52 | Re: Range Types: empty ranges |