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: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: mahi6run@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2019-12-26T13:53:29Z
Lists: pgsql-bugs, pgsql-hackers

Attachments

On Wed, Dec 25, 2019 at 12:24:10PM +0900, Michael Paquier wrote:
> Arf.  Yes, this had better be isAnyTempNamespace() so as we complain
> about all of them.

Okay, finally coming back to that.  Attached is an updated patch with
polished comments and the fixed logic.
--
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.