pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alexey Bashtanov <bashtanov@imap.cc>
Cc: pgsql-bugs@postgresql.org, mmitar@gmail.com, Dimitri Fontaine <dimitri@citusdata.com>
Subject: Re: Is temporary functions feature official/supported? Found some issues with it.
Date: Wed, 2 Jan 2019 19:54:03 -0300
Message-ID: <201901022254.i2tq35ybw75n@alvherre.pgsql> (raw)
In-Reply-To: <10857.1546467488@sss.pgh.pa.us>

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




view thread (22+ messages)  latest in thread

Message-ID: <201901022254.i2tq35ybw75n@alvherre.pgsql>
Permalink:  ../201901022254.i2tq35ybw75n@alvherre.pgsql/
Also on:    postgresql.org/message-id/201901022254.i2tq35ybw75n@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, bashtanov@imap.cc, dimitri@citusdata.com
  Subject: Re: Is temporary functions feature official/supported? Found some issues with it.
  In-Reply-To: <201901022254.i2tq35ybw75n@alvherre.pgsql>
  References: <10857.1546467488@sss.pgh.pa.us> <201901022254.i2tq35ybw75n@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox