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 1hEmld-0008Pa-3Q for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2019 03:22:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEmlZ-0007kS-V0 for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2019 03:22:13 +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 1hEmlZ-0007kL-Nb for pgsql-bugs@lists.postgresql.org; Fri, 12 Apr 2019 03:22:13 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEmlW-00086C-Ke for pgsql-bugs@lists.postgresql.org; Fri, 12 Apr 2019 03:22:12 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 8B42621C24E9; Fri, 12 Apr 2019 06:22:09 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from mail.postgrespro.ru (cyclops.l.postgrespro.ru [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 5FDAD21C2389; Fri, 12 Apr 2019 06:22:09 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 12 Apr 2019 10:22:09 +0700 From: r.zharkov@postgrespro.ru To: Kyotaro HORIGUCHI Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15746: cache lookup failed for function in plpgsql block In-Reply-To: <20190411.211113.08508498.horiguchi.kyotaro@lab.ntt.co.jp> References: <15746-6e0482a4c0f915cb@postgresql.org> <20190411.211113.08508498.horiguchi.kyotaro@lab.ntt.co.jp> Message-ID: <30da20dabeb7171ab31bf066caf69e7f@postgrespro.ru> X-Sender: r.zharkov@postgrespro.ru User-Agent: Roundcube Webmail/1.3.8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-04-11 19:11, Kyotaro HORIGUCHI wrote: > Hello. > > The cause is stale cast function id in cached expression of > plpgsql. (get_cast_hashentry) > > Happens since 9.5 to 11. Once happens, the symptom persists > until session-end. Doesn't happen on 9.4 since it doesn't cache > cast expressions. 12 invalidates cached cast expressions > (04fe805a17). > > It seems to me possible that a cast calls a wrong function and > leads to a crash. But I don't come up with a good way to fix > this, but applying a part of the patch 04fe805a17 on 11(.2) seems > working. > > regards. Hello, Thank you! The patch works. -- regards, Roman Zharkov