Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mahendra Singh <mahi6run(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema
Date: 2019-12-26 17:51:56
Message-ID: 28862.1577382716@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Mahendra Singh <mahi6run(at)gmail(dot)com> writes:
> I think, we can add a regression test for this.
> postgres=# create temporary table temp(c1 int);
> CREATE TABLE
> postgres=# drop schema pg_temp_3 cascade ;
> ERROR: cannot drop temporary namespace "pg_temp_3"
> postgres=#

No, we can't, because the particular temp namespace used by a given
session isn't stable.

> I thought that auto_vacuum wlll drop all
> the temp table schema but it is not drooping.

Generally speaking, once a particular pg_temp_N schema exists it's
never dropped, just recycled for use by subsequent sessions.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-12-26 18:58:35 Re: Indexing on JSONB field not working
Previous Message Kuldip Zalavadiya 2019-12-26 17:29:19 PostgreSQL Installation Error

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-12-26 18:13:41 Re: proposal: schema variables
Previous Message Tom Lane 2019-12-26 17:47:31 Re: Rearranging ALTER TABLE to avoid multi-operations bugs