Re: Issue in pg_catalog.pg_indexes view definition
От | Dilip Kumar |
---|---|
Тема | Re: Issue in pg_catalog.pg_indexes view definition |
Дата | |
Msg-id | CAFiTN-sWBg4+tQmh6_Z6E_az0R1QAK4D9eSTuB=kDwwAH3LLcw@mail.gmail.com обсуждение исходный текст |
Ответ на | Issue in pg_catalog.pg_indexes view definition (Dilip Kumar <dilipbalaut@gmail.com>) |
Ответы |
Re: Issue in pg_catalog.pg_indexes view definition
|
Список | pgsql-hackers |
On Thu, Jul 14, 2016 at 12:38 PM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
I am not sure what should be the correct fix for this problem.I think even if we try to call this function on index oid pg_get_indexdef(x.indexrelid) AS indexdef, problem will not be solved, because both will fall in same equivalence class hence clause can be distributed to pg_class also.
Patch is attached for the same..
Plan after patch: (Now it pushed to pg_index table, which is perfectly fine)
Nested Loop Left Join (cost=22.36..39.30 rows=9 width=288)
Join Filter: (t.oid = i.reltablespace)
-> Hash Left Join (cost=22.36..37.98 rows=9 width=200)
Hash Cond: (c.relnamespace = n.oid)
-> Hash Join (cost=21.23..36.72 rows=9 width=140)
Hash Cond: (i.oid = x.indexrelid)
-> Seq Scan on pg_class i (cost=0.00..14.95 rows=121 width=72)
Filter: (relkind = 'i'::"char")
-> Hash (cost=20.93..20.93 rows=24 width=72)
-> Hash Join (cost=15.72..20.93 rows=24 width=72)
Hash Cond: (x.indrelid = c.oid)
-> Seq Scan on pg_index x (cost=0.00..4.51 rows=120 width=8)
Filter: (pg_get_indexdef(indexrelid) IS NOT NULL)
--
Вложения
В списке pgsql-hackers по дате отправления: