Re: Partitioning with temp tables is broken

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Partitioning with temp tables is broken
Дата
Msg-id 20180619105241.GA1548@paquier.xyz
обсуждение исходный текст
Ответ на Re: Partitioning with temp tables is broken  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Ответы Re: Partitioning with temp tables is broken  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список pgsql-hackers
On Tue, Jun 19, 2018 at 02:50:44PM +0530, Ashutosh Bapat wrote:
> +
> +     <listitem>
> +      <para>
> +       Mixing temporary and permanent relations in the same partition tree
> +       is not allowed.  Hence, if the root partitioned table is permanent,
>
> Do we want to mention "root" explicitly here?

Yes, let's use "partitioned table" here.  The docs also say so for
CREATE TABLE ... PARTITION BY.

> In general it looks like we could write the above paragraph as
> "A permanant partitioned table should have all its partitions
> permanant. A temporary partitioned table should have all its
> partitions temporary and should belong to the same session which
> temporary partitioned table belongs to."

I find the suggestion from Amit more elegant, still you are right that
mentioning that all temporary relations need to be from the same session
would be a good addition :)

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
temporary.  When using temporary relations, all members of the partition
tree have to be from the same session."

> Looks like MergeAttributes() is doing more than just merging attributes. But
> that's not fault of this patch. It's been so for quite some time.

I also find that a bit depressing, but that's not work for v11 at this
stage.
--
Michael

Вложения

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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Postgres 11 release notes
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Partitioning with temp tables is broken