Re: pgsql: Clarify use of temporary tables within partition trees
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: David Rowley <david.rowley@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-03T07:05:51Z
Lists: 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
Commits
-
Remove dead code for temporary relations in partition planning
- 5fca035903a2 11.0 landed
- fc057b2b8fc3 12.0 landed
-
Clarify use of temporary tables within partition trees
- 5862174ec78a 10.5 cited
-
Expand partitioned table RTEs level by level, without flattening.
- 0a480502b092 11.0 cited