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

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(at)paquier(dot)xyz>, digoal(at)126(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15565: truncate bug with tables which have temp table inherited
Date: 2018-12-25 00:52:55
Message-ID: c0bd4ae3-9fa2-bf15-5f32-7cd2910ec5fd@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2018/12/25 9:45, Michael Paquier wrote:
> 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.

Hmm, why don't we just ignore them like queries do?

Thanks,
Amit

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Etsuro Fujita 2018-12-25 01:48:05 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction
Previous Message Amit Langote 2018-12-25 00:50:32 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction