Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ikXIo-0005Nt-C6 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2019 17:52:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ikXIn-0005w9-8M for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2019 17:52:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ikXIm-0005vy-Vt for pgsql-hackers@lists.postgresql.org; Thu, 26 Dec 2019 17:52:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ikXIk-0007cM-Ht for pgsql-hackers@lists.postgresql.org; Thu, 26 Dec 2019 17:52:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBQHpuxM028863; Thu, 26 Dec 2019 12:51:56 -0500 From: Tom Lane To: Mahendra Singh cc: Michael Paquier , Kyotaro Horiguchi , PostgreSQL Hackers 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 In-reply-to: References: <20191225022203.GD3448@paquier.xyz> <20191225.121826.1424647210525092235.horikyota.ntt@gmail.com> <20191225032410.GG3448@paquier.xyz> <20191226135329.GA249363@paquier.xyz> Comments: In-reply-to Mahendra Singh message dated "Thu, 26 Dec 2019 20:20:14 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28861.1577382716.1@sss.pgh.pa.us> Date: Thu, 26 Dec 2019 12:51:56 -0500 Message-ID: <28862.1577382716@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mahendra Singh 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