pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alexey Bashtanov <bashtanov@imap.cc>
Cc: pgsql-bugs@postgresql.org
Cc: mmitar@gmail.com
Subject: Re: Is temporary functions feature official/supported? Found some issues with it.
Date: Fri, 04 Jan 2019 09:54:39 -0500
Message-ID: <9176.1546613679@sss.pgh.pa.us> (raw)
In-Reply-To: <20190104131351.GF2067@paquier.xyz>
References: <5d910e2e-0db8-ec06-dd5f-baec420513c3@imap.cc>
	<22938.1546456949@sss.pgh.pa.us>
	<52794060-3339-e699-a8d5-e3dd7c81fa95@imap.cc>
	<10857.1546467488@sss.pgh.pa.us>
	<20190104131351.GF2067@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Jan 02, 2019 at 05:18:08PM -0500, Tom Lane wrote:
>> Hm.  I can reproduce this if I start in a virgin database, but not
>> otherwise.  I think the problem is that the prepared transaction has
>> created the pg_temp_NN schema for its session, and therefore there
>> is an uncommitted pg_namespace entry for that schema name, and the
>> second session is also trying to create that schema (because it has
>> the same backend ID) so it blocks waiting to see if that index
>> entry commits.

> That should not be allowed to commit directly.  I think that we should
> just add a new value for MyXactFlags which tracks the transaction
> where the temporary namespace has been created, and generate an error
> if trying to use 2PC in this case.  A separate flag looks necessary to
> me so as we don't bump on "cannot PREPARE a transaction that has
> operated on temporary tables" in this case.

Hm, I had forgotten that we had such an error message.  Really that
restriction needs to apply to any object in the temp namespace, not only
tables.

			regards, tom lane




view thread (22+ messages)  latest in thread

Message-ID: <9176.1546613679@sss.pgh.pa.us>
Permalink:  ../9176.1546613679@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9176.1546613679@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, michael@paquier.xyz, bashtanov@imap.cc, mmitar@gmail.com
  Subject: Re: Is temporary functions feature official/supported? Found some issues with it.
  In-Reply-To: <9176.1546613679@sss.pgh.pa.us>
  References: <5d910e2e-0db8-ec06-dd5f-baec420513c3@imap.cc> <22938.1546456949@sss.pgh.pa.us> <52794060-3339-e699-a8d5-e3dd7c81fa95@imap.cc> <10857.1546467488@sss.pgh.pa.us> <20190104131351.GF2067@paquier.xyz> <9176.1546613679@sss.pgh.pa.us>

* 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