Re: Partitioning with temp tables is broken

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, amul sul <sulamul(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Partitioning with temp tables is broken
Date: 2018-06-20 04:32:58
Message-ID: f365add5-b828-5cf9-3d7e-69720883776a@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018/06/20 10:54, Michael Paquier wrote:
> On Tue, Jun 19, 2018 at 04:26:56PM +0530, Ashutosh Bapat wrote:
>> On Tue, Jun 19, 2018 at 4:22 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>>> I was under the impression that this was implied in the precious
>>> phrasing but you guys visibly don't match with my impression. So I
>>> would suggest this paragraph at the end:
>>> "Mixing temporary and permanent relations in the same partition tree is
>>> not allowed. Hence, if the partitioned table is permanent, so must be
>>> its partitions at all levels and likewise if the partitioned table is
>>
>> You don't need to mention "at all levels", its implied recursively.
>
> Okay, done on master and REL_10_STABLE. I have adapted the tests and
> the code on v10 where default partitions do not apply. I have also
> removed the test case for partition pruning in REL_10_STABLE as those
> have been mainly added by 8d4e70a6, master of course keeps it.

Thank you, especially for putting in the extra work for back-patching. I
shouldn't have used default partition syntax in tests, sorry.

> I have included Ashutosh's last suggestions and finished with the
> following phrasing:

I liked both of Ashutosh's suggestions, which I see you incorporated into
the commit.

> "Mixing temporary and permanent relations in the same partition tree is
> not allowed. Hence, if the partitioned table is permanent, so must be
> its partitions and likewise if the partitioned table is temporary. When
> using temporary relations, all members of the partition tree have to be
> from the same session."

Just a minor nit in the last sentence:

"have to be from" -> "must be from / must belong to"

> I am not sure why this set of emails does not actually appear on
> UI interface for archives of pgsql-hackers... All hackers are receiving
> that, right?

I evidently got your email just fine. :)

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-06-20 04:47:55 Re: Partitioning with temp tables is broken
Previous Message Tom Lane 2018-06-20 04:17:14 Re: Add necessary package list to ldap TAP's README