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 06:44:52
Message-ID: 20180703064452.GB11732@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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

In response to

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

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