Re: [HACKERS] scan on inheritance parent with no children in currentsession
От | Amit Langote |
---|---|
Тема | Re: [HACKERS] scan on inheritance parent with no children in currentsession |
Дата | |
Msg-id | 592621c7-3712-77de-eb6c-53075199dcf5@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | [HACKERS] scan on inheritance parent with no children in current session (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: [HACKERS] scan on inheritance parent with no children in current session
|
Список | pgsql-hackers |
On 2017/08/04 18:11, Ashutosh Bapat wrote: > After that commit in session 1, we get an Append plan > postgres=# explain verbose select * from parent; > QUERY PLAN > ------------------------------------------------------------------- > Append (cost=0.00..0.00 rows=1 width=4) > -> Seq Scan on public.parent (cost=0.00..0.00 rows=1 width=4) > Output: parent.a > (3 rows) > > I don't think this is an intentional change. Here's patch to fix it. > The comment in the patch uses term "real child" in the context of > comments about temporary children from other session and the comment > at the end of the function where rte->inh is reset. May be we should > move the second comment before setting has_child in the patch and use > "real child" in the comment at the end to avoid repetition. But I want > to first check whether we want this fix or we can live with the Append > plan. Good catch. I agree that getting an Append node after that commit is unintentional and we should fix so that we don't get an Append. So, +1 to your patch. I looked at the patch and the code fix seems to do what we want. Thanks, Amit
В списке pgsql-hackers по дате отправления: