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 1gekOT-0001D7-Ao for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Jan 2019 17:33:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gekOR-0002sY-6A for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Jan 2019 17:33:23 +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 1gekOP-0002sR-D9 for pgsql-bugs@lists.postgresql.org; Wed, 02 Jan 2019 17:33:23 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gekOL-0001J5-KT for pgsql-bugs@postgresql.org; Wed, 02 Jan 2019 17:33:20 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 6CA8B22133; Wed, 2 Jan 2019 12:33:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 02 Jan 2019 12:33:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imap.cc; h=to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=fm2; bh=ByHGG9GlscCmkMztvWHWEAZ3ZL aOpwYJpJtUZYhNGg4=; b=PeH1Jcycc+OmzOaYLx64Q8fXSBKt0IIjd4A0wLOU+4 QWKtK6i8/RMvv4y51cm9RFtKFwFj3Dz6KA/MhRw19Ct+6rqwr4QSc+6/Rzyx0ecg 4fXg9/IhIJGGcek5VjZDngRInDRi+aYHvGrmkkOBW8G2UM5wpclnCgst0nhwDHsM DbqdhoSBuA7I8mJYvL18oWGI7IZH3JLEI7b8ZGWQRKQzXctln/eJ6YCvQa3tsqTG QsY+2QvRfU2xmov3J3aCO1uaoZVPZuvX9sRuO3PPD47wjiBO1SOKo8/4uGzihRNJ j3qUfCgY57y9Z+rm+i72Z2EqX75cpJX9UWaHDiuQ1T9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ByHGG9 GlscCmkMztvWHWEAZ3ZLaOpwYJpJtUZYhNGg4=; b=gChNDHMDQsyhix6YXwP5qW 9n5hk8Ogd5PGM8fk3Gp5oVvS+Pa7fj8Czc3Oy4Yg4Y4gLr4x7IX/AmWL7Ae7Cef8 vf2K/qKwiqGqfZVhXKOqwr3V/Co0ka08gW2oLMZ5OlHynGoiN6N+BZJKNnNfdpgG StYMXldO0UUNRlAlOxQg2o0SpOyvqB9FAp8mK6YONfNzRIhqmQtbLGp8SGtKd58h MT9gfhpy1XPX1ee3sPETlBBHG6PmquIFjTrY/AGIRH1a/T4AntkXOQ9zWuYTIlap XSip4x05AtHoQJxIyWiXOO1QtAdTPt63tcDuxpdgM34f5E1pd+aDDjMxTAIV5AcA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrudeigdeljeculddtuddrgedtkedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfedtmdenucfjughrpefvhf fukffffgggtgfgsehtkeertddtfeejnecuhfhrohhmpeetlhgvgigvhicuuegrshhhthgr nhhovhcuoegsrghshhhtrghnohhvsehimhgrphdrtggtqeenucfkphepudekhedrvdehrd effedrjedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsrghshhhtrghnohhvsehimhgr phdrtggtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [10.2.33.124] (unknown [185.25.33.70]) by mail.messagingengine.com (Postfix) with ESMTPA id D147BE4651; Wed, 2 Jan 2019 12:33:13 -0500 (EST) To: pgsql-bugs@postgresql.org Cc: mmitar@gmail.com From: Alexey Bashtanov Subject: Is temporary functions feature official/supported? Found some issues with it. Message-ID: <5d910e2e-0db8-ec06-dd5f-baec420513c3@imap.cc> Date: Wed, 2 Jan 2019 17:33:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, Is creating functions in pg_temp schema something we support? It's undocumented as far as I could see, but maybe I missed it. People seem to use it. 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); 2) data corruption in pg_namespace, server crash (happened a few times, but I'm not yet sure how to reproduce). Is it something worth reporting in more detail? Best,   Alex