Re: pgsql: Clarify use of temporary tables within partition trees

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Clarify use of temporary tables within partition trees
Date: 2018-07-03 07:05:51
Message-ID: 20180703070551.GC11732@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Jul 03, 2018 at 03:49:44PM +0900, Amit Langote wrote:
> I forgot that expand_partitioned_rtentry() will recursively call itself if
> a partition is itself a partitioned table, in which case the above
> code helps.

Actually look at the coverage reports:
https://coverage.postgresql.org/src/backend/optimizer/prep/prepunion.c.gcov.html
1742 : /*
1743 : * If the partitioned table has no partitions or all the partitions are
1744 : * temporary tables from other backends, treat this as non-inheritance
1745 : * case.
1746 : */
1747 4920 : if (!has_child)
1748 0 : parentrte->inh = false;
1749 4920 : }

expand_partitioned_rtentry() never disables this flag on recursive calls
with a multi-level tree. Could it be possible to get a test which
closes the gap?
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2018-07-03 08:49:11 Re: pgsql: Clarify use of temporary tables within partition trees
Previous Message Amit Langote 2018-07-03 06:49:44 Re: pgsql: Clarify use of temporary tables within partition trees

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-07-03 07:06:45 Pluggable Storage - Andres's take
Previous Message Konstantin Knizhnik 2018-07-03 07:03:07 Unusable index