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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Mahendra Singh <mahi6run@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-01-09T04:06:12Z
Lists: pgsql-bugs, pgsql-hackers
On Wed, Jan 08, 2020 at 10:56:01AM +0900, Michael Paquier wrote:
> And done this way as per the attached.  I am of course open to
> objections or better ideas, though this looks formulation looks pretty
> good to me.  Robert?

Just to be clear here, I would like to commit this patch and backpatch
with the current formulation in the error strings in the follow-up
days.  In 9.4~10, the error cannot be reached, but that feels safer if
we begin to work again on this portion of the autovacuum code.  So if
you would like to object, that's the moment..
--
Michael

Commits

  1. Avoid failure if autovacuum tries to access a just-dropped temp namespace.

  2. Revert "Forbid DROP SCHEMA on temporary namespaces"

  3. Forbid DROP SCHEMA on temporary namespaces

  4. Make autovacuum more aggressive to remove orphaned temp tables

  5. Code review for early drop of orphaned temp relations in autovacuum.