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

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Clarify use of temporary tables within partition trees
Date: 2018-07-04 01:13:06
Message-ID: f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2018/07/03 21:15, Ashutosh Bapat wrote:
> On Tue, Jul 3, 2018 at 3:20 PM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>
>> Maybe because that's what's done for the root parent in a plain
>> inheritance hierarchy, which is always a plain table. In that case, one
>> RTE is for its role as the parent (with rte->inh = true) and another is
>> for its role as a child (with rte->inh = false). The former is processed
>> as an append rel and the latter as a plain rel that will get assigned scan
>> paths such as SeqScan, etc.
>
> Yes that's true. I remember we had some discussion about these two
> RTEs and that the one marked as child was extraneous, but I can not
> spot that in the mail thread. It's one of the things we did as part of
> partition-wise join and that thread is pretty long. It was probably
> kept without changing it because a. we wanted to get the bigger patch
> committed without breaking anything and this was a small thing which
> we couldn't decide whether was safe or not b. if it was safe not to
> create that entry, it should have been done in a commit which avoided
> creating scans for partitioned tables, but didn't

About (b), maybe yes. Perhaps, I/we decided to put it off until we got
around to writing a patch for making inheritance expansion step-wise for
partitioned tables. We didn't get to that until 11dev branch opened up
for development. The patch that I had proposed for step-wise expansion
was such that the duplicate RTE for parents would not get created, but it
wasn't committed. That was one of the things that was different from your
patch for step-wise expansion which was committed.

Thanks,
Amit

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2018-07-04 01:24:15 Re: pgsql: Clarify use of temporary tables within partition trees
Previous Message Michael Paquier 2018-07-03 22:32:20 Re: pgsql: Add wait event for fsync of WAL segments

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-07-04 01:24:15 Re: pgsql: Clarify use of temporary tables within partition trees
Previous Message Tsunakawa, Takayuki 2018-07-04 00:27:18 How can we submit code patches that implement our (pending) patents?