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-03T06:44:52Z
Lists: pgsql-hackers
On Tue, Jul 03, 2018 at 03:29:36PM +0900, Amit Langote wrote: > Why is this not near the beginning of expand_partitioned_rtentry()? > > Also, ISTM, this code would be unreachable because > expand_inherited_rtentry would not call here if the above if statement is > true, no? FWIW, I understood that the intention here is to be careful, particularly if expand_partitioned_rtentry begins to get called from a different code path in the future, which is something that would likely happen. We could replace that by an assertion or even an elog(), and change again this code in the future, now what's proposed here makes quite some sense to me as well. -- 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