Fix for Index Advisor related hooks

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Fix for Index Advisor related hooks
Дата
Msg-id AANLkTikHUBrx5o==7O1Tk7i+Jnhrox3yh+j0igcbYU--@mail.gmail.com
обсуждение исходный текст
Ответы Re: Fix for Index Advisor related hooks  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: Fix for Index Advisor related hooks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Range Types: empty ranges
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Sorting. When?