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 1ioWGJ-0003K9-O5 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jan 2020 17:33:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ioWGH-0000Kb-2P for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jan 2020 17:33:53 +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 1ioWGG-0000KU-MJ for pgsql-hackers@lists.postgresql.org; Mon, 06 Jan 2020 17:33:52 +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 1ioWGD-0007w4-QK for pgsql-hackers@lists.postgresql.org; Mon, 06 Jan 2020 17:33:51 +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 006HXliG031320; Mon, 6 Jan 2020 12:33:47 -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: <20191225022203.GD3448@paquier.xyz> <20191225.121826.1424647210525092235.horikyota.ntt@gmail.com> <20191225032410.GG3448@paquier.xyz> <20191226135329.GA249363@paquier.xyz> <28862.1577382716@sss.pgh.pa.us> <20191227090604.GA540891@paquier.xyz> <20200106014202.GA3598@paquier.xyz> Comments: In-reply-to Robert Haas message dated "Mon, 06 Jan 2020 12:25:19 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31318.1578332027.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 06 Jan 2020 12:33:47 -0500 Message-ID: <31319.1578332027@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > I'm not arguing for a revert of 246a6c8. I think we should just change = this: > ... > To look more like: > char *nspname =3D get_namespace_name(classForm->relnamespace); > if (nspname !=3D NULL) > ereport(..."autovacuum: dropping orphan temp table \"%s.%s.%s\"...) > else > ereport(..."autovacuum: dropping orphan temp table with OID %u"....) > If we do that, then I think we can just revert > a052f6cbb84e5630d50b68586cecc127e64be639 completely. +1 to both of those --- although I think we could still provide the table name in the null-nspname case. > autovacuum.c seems to have been using get_namespace_name() without a > null check since 2006, so it's not really the fault of your patch as I > had originally thought. I wonder how in the world we've managed to get > away with it for as long as we have. Maybe we haven't. It's not clear that infrequent autovac crashes would get reported to us, or that we'd successfully find the cause if they were. I think what you propose above is a back-patchable bug fix. regards, tom lane