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

From Alvaro Herrera
Subject Re: Is temporary functions feature official/supported? Found someissues with it.
Date
Msg-id 201901022254.i2tq35ybw75n@alvherre.pgsql
Whole thread Raw
In response to Re: Is temporary functions feature official/supported? Found some issues with it.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 2019-Jan-02, Tom Lane wrote:

> Maybe we ought to forbid prepared transactions from creating (or
> deleting?) any temp objects.  I seem to remember that we already
> made some restrictions of that sort, but they clearly weren't
> sufficient to prevent all problems.

We make that check at transaction prepare time, but obviously there's no
way to do it any earlier since we don't know ahead of time whether the
transaction is going to do the normal commit/abort or become prepared.
Moreover, Dimitri has recently posted a patch[1] allowing prepared
transactions to commit if their temp tables are ON COMMIT DROP, which
conflicts with this approach.  This seems problematic if the pg_temp_NN
entry is reused.

Maybe we should make temp namespace names more unique if we want to
add extra features :-(

[1] https://postgr.es/m/m2d0pllvqy.fsf@dimitris-macbook-pro.home

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is temporary functions feature official/supported? Found some issues with it.
Next
From: Michael Paquier
Date:
Subject: Re: BUG #15548: Unaccent does not remove combining diacriticalcharacters