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 1iotF9-0006z3-CF for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jan 2020 18:06:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iotF8-0004j1-0e for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jan 2020 18:06:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iotF7-0004iu-KS for pgsql-hackers@lists.postgresql.org; Tue, 07 Jan 2020 18:06:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iotF5-0002vT-2V for pgsql-hackers@lists.postgresql.org; Tue, 07 Jan 2020 18:06:12 +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 007I68j6014869; Tue, 7 Jan 2020 13:06:08 -0500 From: Tom Lane To: Robert Haas cc: Michael Paquier , Mahendra Singh , 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: <20191225032410.GG3448@paquier.xyz> <20191226135329.GA249363@paquier.xyz> <28862.1577382716@sss.pgh.pa.us> <20191227090604.GA540891@paquier.xyz> <20200106014202.GA3598@paquier.xyz> <31319.1578332027@sss.pgh.pa.us> <20200107002216.GA2386@paquier.xyz> Comments: In-reply-to Robert Haas message dated "Tue, 07 Jan 2020 10:59:22 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14867.1578420368.1@sss.pgh.pa.us> Date: Tue, 07 Jan 2020 13:06:08 -0500 Message-ID: <14868.1578420368@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Mon, Jan 6, 2020 at 7:22 PM Michael Paquier wrote: >> For the second one, I would really wish that we keep the restriction >> put in place by a052f6c until we actually figure out how to make the >> operation safe in the ways we want it to work because this puts >> the catalogs into an inconsistent state for any object type able to >> use a temporary schema, like functions, domains etc. for example able >> to use "pg_temp" as a synonym for the temp namespace name. And any >> connected user is able to do that. > So what? I still agree with Robert that a052f6c is a bad idea. It's not the case that that's blocking "any connected user" from causing an issue. The temp schemas are always owned by the bootstrap superuser, so only a superuser could delete them. All that that patch is doing is preventing superusers from doing something that they could reasonably wish to do, and that is perfectly safe when there's not concurrent usage of the schema. We are not normally that nanny-ish, and the case for being so here seems pretty thin. regards, tom lane