Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gem6I-0005rd-0n for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Jan 2019 19:22:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gem6F-0008C0-Ax for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Jan 2019 19:22:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gem6F-0008Bs-4W for pgsql-bugs@lists.postgresql.org; Wed, 02 Jan 2019 19:22:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gem67-0003vd-VC for pgsql-bugs@postgresql.org; Wed, 02 Jan 2019 19:22:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x02JMTBf022939; Wed, 2 Jan 2019 14:22:30 -0500 From: Tom Lane To: Alexey Bashtanov cc: pgsql-bugs@postgresql.org, mmitar@gmail.com Subject: Re: Is temporary functions feature official/supported? Found some issues with it. In-reply-to: <5d910e2e-0db8-ec06-dd5f-baec420513c3@imap.cc> References: <5d910e2e-0db8-ec06-dd5f-baec420513c3@imap.cc> Comments: In-reply-to Alexey Bashtanov message dated "Wed, 02 Jan 2019 17:33:12 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22937.1546456949.1@sss.pgh.pa.us> Date: Wed, 02 Jan 2019 14:22:29 -0500 Message-ID: <22938.1546456949@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexey Bashtanov writes: > Is creating functions in pg_temp schema something we support? Yeah. > I found that a combination of temporary functions and prepared > transactions can lead to: > 1) all other sessions being unable to create a temporary table until the > prepared transaction is finished (reproducible); Locking issue perhaps? It's not a bug if a prepared transaction is holding a lock. > 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. regards, tom lane