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

From Alexey Bashtanov
Subject Re: Is temporary functions feature official/supported? Found someissues with it.
Date
Msg-id 52794060-3339-e699-a8d5-e3dd7c81fa95@imap.cc
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>)
Responses Re: Is temporary functions feature official/supported? Found some issues with it.
List pgsql-bugs
>> 1) all other sessions being unable to create a temporary table until the
>> prepared transaction is finished (reproducible);
> Locking issue perhaps?

For sure.

session1:

l=> begin;
BEGIN
l=> create function pg_temp.foo() returns void as $$ begin end; $$ 
language plpgsql;
CREATE FUNCTION
l=> prepare transaction 'z';
PREPARE TRANSACTION
l=> \q

session2:

l=> create temp table t();
^CCancel request sent
... blabla when inserting (0,15) into "pg_namespace_nspname_index" ... 
(sorry, server was running in non-english locale)


reprocuced in master and in 10.5

>    It's not a bug if a prepared transaction
> is holding a lock.

The weird thing is the lock comes on namespace level locking against 
creating any temporary object.
It isn't the case for without prepared transactions, neither can it be 
achieved with CREATE TEMP TABLE only with no functions involved.


>> 2) data corruption in pg_namespace, server crash (happened a few times,
>> but I'm not yet sure how to reproduce).
> That would be interesting.

I cannot reproduce it on 10.5.

Will try on master later and get back to you if I have any luck.

Best,
   Alex




pgsql-bugs by date:

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