pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Mahendra Singh <mahi6run@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: Mon, 06 Jan 2020 12:33:47 -0500
Message-ID: <31319.1578332027@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmobPJ+CQGr1nKnt4rNikgBqHvXtJ+x8UW0U_kR6ksf2D-A@mail.gmail.com>
References: <CAKYtNAr9Zq=1-ww4etHo-VCC-k120YxZy5OS01VkaLPaDbv2tg@mail.gmail.com>
	<20191225022203.GD3448@paquier.xyz>
	<20191225.121826.1424647210525092235.horikyota.ntt@gmail.com>
	<20191225032410.GG3448@paquier.xyz>
	<20191226135329.GA249363@paquier.xyz>
	<CAKYtNAqq_XP32DTbaWuuOHZpE6HSKs3xOj_ONMWNoFzoJ7iCYQ@mail.gmail.com>
	<28862.1577382716@sss.pgh.pa.us>
	<CAKYtNApQ4ctL5AnP+2rSoV9vB+cmXp5OiwponY5QL_w4C5SH_w@mail.gmail.com>
	<20191227090604.GA540891@paquier.xyz>
	<CA+TgmobL4npEX5=E5h=5Jm_9mZun3MT39Kq2suJFVeamc9skSQ@mail.gmail.com>
	<20200106014202.GA3598@paquier.xyz>
	<CA+TgmobPJ+CQGr1nKnt4rNikgBqHvXtJ+x8UW0U_kR6ksf2D-A@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> I'm not arguing for a revert of 246a6c8.  I think we should just change this:
> ...
> To look more like:

> char *nspname = get_namespace_name(classForm->relnamespace);
> if (nspname != 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





view thread (37+ messages)  latest in thread

Message-ID: <31319.1578332027@sss.pgh.pa.us>
Permalink:  ../31319.1578332027@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31319.1578332027@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, robertmhaas@gmail.com, michael@paquier.xyz, mahi6run@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: <31319.1578332027@sss.pgh.pa.us>
  References: <CAKYtNAr9Zq=1-ww4etHo-VCC-k120YxZy5OS01VkaLPaDbv2tg@mail.gmail.com> <20191225022203.GD3448@paquier.xyz> <20191225.121826.1424647210525092235.horikyota.ntt@gmail.com> <20191225032410.GG3448@paquier.xyz> <20191226135329.GA249363@paquier.xyz> <CAKYtNAqq_XP32DTbaWuuOHZpE6HSKs3xOj_ONMWNoFzoJ7iCYQ@mail.gmail.com> <28862.1577382716@sss.pgh.pa.us> <CAKYtNApQ4ctL5AnP+2rSoV9vB+cmXp5OiwponY5QL_w4C5SH_w@mail.gmail.com> <20191227090604.GA540891@paquier.xyz> <CA+TgmobL4npEX5=E5h=5Jm_9mZun3MT39Kq2suJFVeamc9skSQ@mail.gmail.com> <20200106014202.GA3598@paquier.xyz> <CA+TgmobPJ+CQGr1nKnt4rNikgBqHvXtJ+x8UW0U_kR6ksf2D-A@mail.gmail.com> <31319.1578332027@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