pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Mahendra Singh Thalor <mahi6run@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
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
Date: Fri, 28 Feb 2020 12:20:02 -0500
Message-ID: <18998.1582910402@sss.pgh.pa.us> (raw)
In-Reply-To: <20200116040618.GF3117@paquier.xyz>
References: <20200107002216.GA2386@paquier.xyz>
	<CA+TgmoYCd6gaCy2-YzO5DyR=YFxRAbKaC5ucL9DL4jSnTgs14A@mail.gmail.com>
	<14868.1578420368@sss.pgh.pa.us>
	<20200108004409.GA3413@paquier.xyz>
	<5602.1578444917@sss.pgh.pa.us>
	<20200108015601.GB3413@paquier.xyz>
	<20200109040612.GG2251@paquier.xyz>
	<CAKYtNArmm0f4zYHebpQ9kf7LOJeiuexKSnnmhiOiLQc3_F39ug@mail.gmail.com>
	<20200110080125.GA250447@paquier.xyz>
	<20200110110748.GD250447@paquier.xyz>
	<20200116040618.GF3117@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> And back on that one, I still like better the solution as of the
> attached which skips any relations with their namespace gone missing
> as 246a6c87's intention was only to allow orphaned temp relations to
> be dropped by autovacuum when a backend slot is connected, but not
> using yet its own temp namespace.

Simply skipping the drop looks like basically the right fix to me.

A tiny nit is that using "get_namespace_name(...) != NULL" as a test for
existence of the namespace seems a bit weird/unreadable.  I'd be more
inclined to code that as a SearchSysCacheExists test, at least in the
place where you don't actually need the namespace name.

Also, I notice that isTempNamespaceInUse is already detecting the case
where the namespace doesn't exist or isn't really a temp namespace.
I wonder whether it'd be better to teach that to return an indicator about
the namespace not being what you think it is.  That would force us to look
at its other callers to see if any of them have related bugs, which seems
like a good thing to check --- and even if they don't, having to think
about the point in future call sites might forestall new bugs.

			regards, tom lane





view thread (37+ messages)  latest in thread

Message-ID: <18998.1582910402@sss.pgh.pa.us>
Permalink:  ../18998.1582910402@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18998.1582910402@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, mahi6run@gmail.com, robertmhaas@gmail.com, horikyota.ntt@gmail.com, pgsql-hackers@lists.postgresql.org
  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: <18998.1582910402@sss.pgh.pa.us>
  References: <20200107002216.GA2386@paquier.xyz> <CA+TgmoYCd6gaCy2-YzO5DyR=YFxRAbKaC5ucL9DL4jSnTgs14A@mail.gmail.com> <14868.1578420368@sss.pgh.pa.us> <20200108004409.GA3413@paquier.xyz> <5602.1578444917@sss.pgh.pa.us> <20200108015601.GB3413@paquier.xyz> <20200109040612.GG2251@paquier.xyz> <CAKYtNArmm0f4zYHebpQ9kf7LOJeiuexKSnnmhiOiLQc3_F39ug@mail.gmail.com> <20200110080125.GA250447@paquier.xyz> <20200110110748.GD250447@paquier.xyz> <20200116040618.GF3117@paquier.xyz> <18998.1582910402@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox