Re: Prevent extension creation in temporary schemas

From: Chris Travers <chris(dot)travers(at)adjust(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, dimitri(at)citusdata(dot)com
Subject: Re: Prevent extension creation in temporary schemas
Date: 2019-02-13 11:08:50
Message-ID: CAN-RpxDcXqzn=WRgMCs+TeRugF0Q4S8zgbCGshQhs6zu9Nwj+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 12, 2019 at 12:48 AM Michael Paquier <michael(at)paquier(dot)xyz>
wrote:

> On Sat, Jan 12, 2019 at 08:34:37AM +0900, Michael Paquier wrote:
> > Then the extension is showing up as beginning to be present for other
> > users. I am mainly wondering if this case has actually been thought
> > about in the past or discussed, and what to do about that and if we
> > need to do something.
>
> The point here is about the visibility in \dx.
>

If the point is visibility in \dx it seems to me we want to fix the \dx
query.

This is actually a very interesting set of problems and behavior is not
intuitive here in PostgreSQL. I wonder how much more inconsistency we want
to add.

For example: suppose I create a type in pg_temp and create a table in
public with a column using that type.

What is the expected visibility in other sessions?

What happens to the table when I log out?

I went ahead and tested that case and I found the behavior to be, well,
unintuitive. The temporary type is visible to other sessions and the
column is implicitly dropped when the type falls out of session scope.
Whether or not we want to prevent that, I think that having special casing
here for extensions makes this behavior even more inconsistent. I guess I
would vote against accepting this patch as it is.

> --
> Michael
>

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Travers 2019-02-13 11:16:33 Re: Challenges preventing us moving to 64 bit transaction id (XID)?
Previous Message Matsumura, Ryo 2019-02-13 09:58:33 RE: [PROPOSAL]a new data type 'bytea' for ECPG