Re: get_relation_stats_hook()
| От | Gregory Stark |
|---|---|
| Тема | Re: get_relation_stats_hook() |
| Дата | |
| Msg-id | 87fxnsoz6r.fsf@oxford.xeocode.com обсуждение исходный текст |
| Ответ на | get_relation_stats_hook() (Simon Riggs <simon@2ndquadrant.com>) |
| Ответы |
Re: get_relation_stats_hook()
Re: get_relation_stats_hook() Re: get_relation_stats_hook() |
| Список | pgsql-hackers |
Hm, I assume we want to be able to turn on and off plugins in a running session? I think the "free_using_plugin" flag: ! if (get_relation_stats_hook) ! vardata->statsTuple = (*get_relation_stats_hook) ! (rte->relid, ! var->varattno); ! ! if (vardata->statsTuple) ! vardata->free_using_plugin = true; ! else ! vardata->statsTuple = SearchSysCache(STATRELATT, is insufficient to handle this. vardata->free_using_plugin could be true but by the time the variable is released the plugin pointer could have been cleared. Or worse, set to a different plugin. The easiest way to fix this seems like also the best way, instead of storing a boolean store the pointer to the release function. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!
В списке pgsql-hackers по дате отправления: