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

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: pgsql: Clarify use of temporary tables within partition trees
Дата
Msg-id f2254afa-0565-48ef-fb8a-06925c19bd7e@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: pgsql: Clarify use of temporary tables within partition trees  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список pgsql-committers
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



В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Add wait event for fsync of WAL segments
Следующее
От: Amit Langote
Дата:
Сообщение: Re: pgsql: Clarify use of temporary tables within partition trees