Re: Is temporary functions feature official/supported? Found someissues with it. - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: Is temporary functions feature official/supported? Found someissues with it.
Date
Msg-id 20190114004520.GA27704@paquier.xyz
Whole thread Raw
In response to Re: Is temporary functions feature official/supported? Found someissues with it.  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Is temporary functions feature official/supported? Found someissues with it.  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-bugs
On Thu, Jan 10, 2019 at 08:44:13PM +0900, Masahiko Sawada wrote:
> 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.

I am not sure if Robert is a fan of simply forbiding that as per the
question here:
https://www.postgresql.org/message-id/CA+TgmoZJdGcGFm+coHHCbBM3CfPqpjisdiux4Pa9QA3dFFQasw@mail.gmail.com

Anyway, we could take for now the separate approach to prevent the
case of CREATE EXTENSION with 2PC if trying to use a temporary
schema as more holes are closed with this stuff.  Attached is an
updated patch to do so.  This adds a regression test, which would fail
if we decide to prevent the behavior afterwards. This uses two tricks
to avoid CONTEXT and NOTICE messages which include the temporary
session name to keep the test stable:
\set SHOW_CONTEXT never
SET client_min_messages TO 'warning';

Thoughts?
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Jeff Janes
Date:
Subject: Re: BUG #15591: pg_receivewal does not honor replication slots
Next
From: Magnus Hagander
Date:
Subject: Re: BUG #15591: pg_receivewal does not honor replication slots