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: Mon, 28 Nov 2016 12:04:44 -0500
Message-ID: <5219.1480352684@sss.pgh.pa.us> (raw)
In-Reply-To: <865865e1-7064-0319-e7ea-13b7fddad4f1@BlueTreble.com>
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 11/27/16 10:15 AM, Tom Lane wrote:
>> Yeah, I was wondering about that yesterday --- that comment mentions
>> the case of temporary objects, but it only fixes the problem while the
>> script runs. Maybe there should be a separate test for "we're doing
>> temporary-object cleanup" that would similarly prevent recursion to
>> an extension?
> I can't think of any reason you'd want the current behavior.
> Though, it'd arguably be better to remove temp objects created by an
> extension after the script exits, so that they can't "leak" into the
> executing backend. Dunno if that's any harder or not...
Sounds way harder to me. There's no good way to separate temp objects
made by the script from those made earlier in the session. Also, the
general theory of extension scripts is that they're just executed
normally, with the only additional bit of magic being that objects
created during the script are tied to the extension. I'm not sure that
forcibly dropping temp objects at the end fits in that charter at all.
But I think fixing it to not recurse to extensions during temp namespace
cleanup might not be very hard. I'll take a look.
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: <5219.1480352684@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>
* 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