Re: BUG #15565: truncate bug with tables which have temp tableinherited

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15565: truncate bug with tables which have temp tableinherited
Дата
Msg-id 20181225004545.GB2334@paquier.xyz
обсуждение исходный текст
Ответ на BUG #15565: truncate bug with tables which have temp table inherited  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15565: truncate bug with tables which have temp tableinherited  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-bugs
On Mon, Dec 24, 2018 at 09:17:46AM +0000, PG Bug reporting form wrote:
> create table public.a (id int);
> create temp table a (like public.a) inherits(public.a);

This issue is way older than 11.

A couple of months ago there has been a discussion about mixing
temporary and permanent tables in a partition tree:
https://www.postgresql.org/message-id/CAKJS1f94Ojk0og9GMkRHGt8wHTW=ijq5KzJKuoBoqWLwSVwGmw@mail.gmail.com

The conclusion of this time was that we don't want to allow mixing
relations with different persistencies in the same tree for
partitions because those rely on relation cache lookups for their
description (PartitionDesc), however inheritance trees have been able
to accidently work this way for a long time.  This shares a little bit
of history with this report as partition trees and inheritance share
the same lookups at pg_inherits.

So there could be an argument to restrict the definition of
inheritance trees with trees mixing relation persistencies.

It is hard to say as well that truncate silently bypasses the
truncation of a temporary relation from another session if a given
session wants to truncate a whole tree.

Another approach would be to just live with this issue, as the use
case is pretty narrow anyway.
--
Michael

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15566: can't insert money type
Следующее
От: Amit Langote
Дата:
Сообщение: Re: BUG #15565: truncate bug with tables which have temp tableinherited