pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Clarify use of temporary tables within partition trees
Date: Wed, 4 Jul 2018 10:13:06 +0900
Message-ID: <f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp> (raw)
In-Reply-To: <CAFjFpRe=pt_JDF0m_avqj+kcaCLXi11Hs==of88DaFJzQiuu+A@mail.gmail.com>
References: <CAKJS1f_HyV1txn_4XSdH5EOhBMYaCwsXyAj6bHXk9gOu4JKsbw@mail.gmail.com>
	<CA+TgmoY5EOxJSJCxH09rL1bpFHojpcAKyRym1Y=FiCpOv151mw@mail.gmail.com>
	<20180702221650.GA2159@paquier.xyz>
	<CAKJS1f9bFnkWX3iDC0DgCdwDSaAMYjWbENmek23FGQx9FkLREw@mail.gmail.com>
	<20180703045502.GA26236@paquier.xyz>
	<CAKJS1f8f8+3FOBhSoopo15uzHsY76+L8cMKhMwBi+x+bvBU7tg@mail.gmail.com>
	<20180703061119.GA11732@paquier.xyz>
	<CAKJS1f8h8283Vb2NcQH+YOMErdDQZWGuqGoe-gX6yT8TKGf0MA@mail.gmail.com>
	<5db5fe6e-4a73-6a24-09e4-060b9f132ea9@lab.ntt.co.jp>
	<b7cc212d-8455-c548-5a71-3cbf6133abd6@lab.ntt.co.jp>
	<20180703070551.GC11732@paquier.xyz>
	<d5059f0a-9a93-942f-5a8a-ecd13fc26b94@lab.ntt.co.jp>
	<CAKJS1f8Wt3CoYY-7AqtbszBLPrQMaH3xLRd2pSCKDARhQRT__A@mail.gmail.com>
	<79177436-0b62-ee4f-2526-f58db4a45df0@lab.ntt.co.jp>
	<CAFjFpRe=pt_JDF0m_avqj+kcaCLXi11Hs==of88DaFJzQiuu+A@mail.gmail.com>

On 2018/07/03 21:15, Ashutosh Bapat wrote:
> On Tue, Jul 3, 2018 at 3:20 PM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.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





view thread (29+ messages)  latest in thread

Message-ID: <f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp>
Permalink:  ../f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, ashutosh.bapat@enterprisedb.com, david.rowley@2ndquadrant.com, michael@paquier.xyz, robertmhaas@gmail.com
  Subject: Re: pgsql: Clarify use of temporary tables within partition trees
  In-Reply-To: <f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp>
  References: <CAKJS1f_HyV1txn_4XSdH5EOhBMYaCwsXyAj6bHXk9gOu4JKsbw@mail.gmail.com> <CA+TgmoY5EOxJSJCxH09rL1bpFHojpcAKyRym1Y=FiCpOv151mw@mail.gmail.com> <20180702221650.GA2159@paquier.xyz> <CAKJS1f9bFnkWX3iDC0DgCdwDSaAMYjWbENmek23FGQx9FkLREw@mail.gmail.com> <20180703045502.GA26236@paquier.xyz> <CAKJS1f8f8+3FOBhSoopo15uzHsY76+L8cMKhMwBi+x+bvBU7tg@mail.gmail.com> <20180703061119.GA11732@paquier.xyz> <CAKJS1f8h8283Vb2NcQH+YOMErdDQZWGuqGoe-gX6yT8TKGf0MA@mail.gmail.com> <5db5fe6e-4a73-6a24-09e4-060b9f132ea9@lab.ntt.co.jp> <b7cc212d-8455-c548-5a71-3cbf6133abd6@lab.ntt.co.jp> <20180703070551.GC11732@paquier.xyz> <d5059f0a-9a93-942f-5a8a-ecd13fc26b94@lab.ntt.co.jp> <CAKJS1f8Wt3CoYY-7AqtbszBLPrQMaH3xLRd2pSCKDARhQRT__A@mail.gmail.com> <79177436-0b62-ee4f-2526-f58db4a45df0@lab.ntt.co.jp> <CAFjFpRe=pt_JDF0m_avqj+kcaCLXi11Hs==of88DaFJzQiuu+A@mail.gmail.com> <f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox