From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexey Bashtanov <bashtanov(at)imap(dot)cc>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, mmitar(at)gmail(dot)com |
Subject: | Re: Is temporary functions feature official/supported? Found some issues with it. |
Date: | 2019-01-10 11:44:13 |
Message-ID: | CAD21AoBBoGnQkw3vbUU82UGe-+vyZefgWPEzJOaNW5dWQoG1Vw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Jan 10, 2019 at 12:45 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Thu, Jan 10, 2019 at 11:47:32AM +0900, Masahiko Sawada wrote:
> > Yes, I was confused that in spite of the relation is a kind of
> > database object we separate two cases, relation and database objects
> > other than relation. So I thought that we can merge these flags to
> > something like XACT_FLAGS_ACCESSEDTEMPOBJ tracking whether the
> > transaction created, locked or dropped objects such as tables,
> > functions and datatypes on a temoprary namespace.
>
> Sure. For HEAD I don't mind doing so and that makes sense. On
> back-branches though that's another story...
Agreed.
>
> > I've found a corner-case issue with this patch; this issue still
> > happens when we create the extension on the temprary namespace,
> > because it can be done without accessing the namespace if the
> > temporary namespace is already created.
> >
> > postgres(1:59232)=# create table pg_temp.e(c int);
> > CREATE TABLE
> > postgres(1:59232)=# begin;
> > BEGIN
> > postgres(1:59232)=# create extension pgcrypto schema pg_temp_3;
> > CREATE EXTENSION
> > postgres(1:59232)=# prepare transaction 'a';
> > PREPARE TRANSACTION
> > postgres(1:59232)=# create extension pgcrypto;
> > (hang..)
>
> There is a reason why I have split that part into a separate patch and
> a separate thread:
> https://commitfest.postgresql.org/22/1969/
>
> The thing is that this behavior is rather unstable, for example I bump
> easily into that:
> =# create extension dblink schema pg_temp_3;
> ERROR: 42883: function dblink_connect_u(text) does not exist
Yes, IIUC this issue happen only when creating the extension that
doesn't access the function after created it. For example, dblink does
REVOKE for dblink_connect_u() after creation.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2019-01-10 13:55:24 | BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT |
Previous Message | PG Bug reporting form | 2019-01-10 11:15:45 | BUG #15586: Failed to start PostgreSQL Cluster 10-main |