Re: Wrong order of tests in findDependentObjects()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Wrong order of tests in findDependentObjects()
Дата
Msg-id 5219.1480352684@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Wrong order of tests in findDependentObjects()  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Wrong order of tests in findDependentObjects()
Список pgsql-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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_dump / copy bugs with "big lines" ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Autovacuum breakage from a734fd5d1