From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Nasby <Jim.Nasby@BlueTreble.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Wrong order of tests in findDependentObjects()
Date: Thu, 01 Dec 2016 16:09:36 -0500
Message-ID: <13624.1480626576@sss.pgh.pa.us> (raw)
In-Reply-To: <23800.1480362490@sss.pgh.pa.us>
References: <13224.1480177514@sss.pgh.pa.us>
<e51f4311-f483-4dd0-1ccc-abec3c405110@BlueTreble.com>
<5774.1480263301@sss.pgh.pa.us>
<865865e1-7064-0319-e7ea-13b7fddad4f1@BlueTreble.com>
<5219.1480352684@sss.pgh.pa.us>
<23800.1480362490@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
>> Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
>>> I can't think of any reason you'd want the current behavior.
>> But I think fixing it to not recurse to extensions during temp namespace
>> cleanup might not be very hard. I'll take a look.
I wrote a test case to try to demonstrate that this patch was fixing a
bug, and was surprised to find that it didn't fail. The reason turns
out to be that we fixed this problem years ago in commit 08dd23cec:
Also, arrange for explicitly temporary tables to not get linked as
extension members in the first place, and the same for the magic
pg_temp_nnn schemas that are created to hold them. This prevents assorted
unpleasant results if an extension script creates a temp table: the forced
drop at session end would either fail or remove the entire extension, and
neither of those outcomes is desirable.
Now, if you really try hard, say by creating a temp function, you can
break it. But I don't have all that much sympathy for such use-cases.
I think that the patch I wrote is good cleanup, so I'm still inclined
to apply it in HEAD, but I no longer think it's fixing any case that's
significant in the field. I wonder if you have a counterexample?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, Jim.Nasby@BlueTreble.com
Subject: Re: Wrong order of tests in findDependentObjects()
In-Reply-To: <13624.1480626576@sss.pgh.pa.us>
References: <13224.1480177514@sss.pgh.pa.us> <e51f4311-f483-4dd0-1ccc-abec3c405110@BlueTreble.com> <5774.1480263301@sss.pgh.pa.us> <865865e1-7064-0319-e7ea-13b7fddad4f1@BlueTreble.com> <5219.1480352684@sss.pgh.pa.us> <23800.1480362490@sss.pgh.pa.us> <13624.1480626576@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