Re: Prevent extension creation in temporary schemas

From: Chris Travers <chris(dot)travers(at)adjust(dot)com>
To: "Kuroda, Hayato" <kuroda(dot)hayato(at)jp(dot)fujitsu(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "dimitri(at)citusdata(dot)com" <dimitri(at)citusdata(dot)com>
Subject: Re: Prevent extension creation in temporary schemas
Date: 2019-02-18 09:51:47
Message-ID: CAN-RpxA9HmytWo=eVtyRRso7VMZs=gYPqU0ihBwN+gzv8zXo-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 18, 2019 at 6:40 AM Kuroda, Hayato <kuroda(dot)hayato(at)jp(dot)fujitsu(dot)com>
wrote:

> Dear Michael,
>
> I seem this patch is enough, but could you explain the reason
> you drop initial proposal more detail?
> I'm not sure why extensions contained by temporary schemas are acceptable.
>

Here's my objection.

Everything a relocatable extension can create can be created normally in a
temporary schema currently. This includes types, functions, etc.

So I can create a type in a temporary schema and then create a table in a
public schema using that type as a column. This behaves oddly (when I log
out of my session the column gets implicitly dropped) but it works
consistently. Adding special cases to extensions strikes me as adding more
funny corners to the behavior of the db in this regard.

Now there are times I could imagine using temporary schemas with
extensions. This could include testing multiple versions of an extension
so that multiple concurrent test runs don't see each other's versions.
This could be done with normal schemas but the guarantees are not as strong
regarding cleanup.

>
> > Anything depending on a temporary object will be dropped per
> > dependency links once the session is over.
>
> Extensions locate at pg_temp_* schemas are temporary objects IMO.
> How do you think? Would you implement this functionality in future?
>

That's the way things are now as far as I understand it, or do I
misunderstand your question?

>
> Hayato Kuroda
> Fujitsu LIMITED
>
>

--
Best Regards,
Chris Travers
Head of Database

Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com
Saarbrücker Straße 37a, 10405 Berlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-02-18 11:02:54 Re: Prevent extension creation in temporary schemas
Previous Message Michael Meskes 2019-02-18 09:30:14 Re: [PROPOSAL]a new data type 'bytea' for ECPG