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

David Rowley <david.rowley@2ndquadrant.com>

From: David Rowley <david.rowley@2ndquadrant.com>
To: digoal@126.com, pgsql-bugs@lists.postgresql.org
Date: 2018-12-25T07:25:21Z
Lists: pgsql-bugs
On Tue, 25 Dec 2018 at 05:11, PG Bug reporting form
<noreply@postgresql.org> wrote:
> ```
> create table public.a (id int);
> ```
>
> sesssion a:
>
> ```
> create temp table a (like public.a) inherits(public.a);
> ```
>
> session b:
> ```
> create temp table a (like public.a) inherits(public.a);
> ```
>
> any session:
>
> ```
> postgres=# truncate public.a;
> ERROR:  cannot truncate temporary tables of other sessions

Is this blocking a real-world use case? Or did you just happen to
stumble on this?

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Commits

  1. Ignore inherited temp relations from other sessions when truncating