From: Michael Paquier <michael@paquier.xyz>
To: Mahendra Singh <mahi6run@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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, 27 Dec 2019 18:06:04 +0900
Message-ID: <20191227090604.GA540891@paquier.xyz> (raw)
In-Reply-To: <CAKYtNApQ4ctL5AnP+2rSoV9vB+cmXp5OiwponY5QL_w4C5SH_w@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>
On Fri, Dec 27, 2019 at 12:33:03AM +0530, Mahendra Singh wrote:
> On Thu, 26 Dec 2019 at 23:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> No, we can't, because the particular temp namespace used by a given
>> session isn't stable.
And I'd prefer keep the name of the namespace in the error message,
because the information is helpful.
>>> I thought that auto_vacuum wlll drop all
>>> the temp table schema but it is not drooping.
>>
>> Generally speaking, once a particular pg_temp_N schema exists it's
>> never dropped, just recycled for use by subsequent sessions.
>
> Okay. Understood. Thanks for clarification.
Please see RemoveTempRelations() for the details, which uses
PERFORM_DELETION_SKIP_ORIGINAL to avoid a drop of the temp schema, and
just work on all the objects the schema includes.
And committed down to 9.4. We use much more "temporary schema" in
error messages actually, so I have switched to that.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, mahi6run@gmail.com, tgl@sss.pgh.pa.us, 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: <20191227090604.GA540891@paquier.xyz>
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>
* 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