Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUItF-00045O-FW for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2020 00:19:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kUItC-00047l-Ti for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2020 00:19:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUItC-00047e-Nn for pgsql-bugs@lists.postgresql.org; Mon, 19 Oct 2020 00:19:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUItA-0006jH-C1 for pgsql-bugs@postgresql.org; Mon, 19 Oct 2020 00:19:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09J0IuLs247890; Sun, 18 Oct 2020 20:18:56 -0400 From: Tom Lane To: pinker cc: pgsql-bugs@postgresql.org Subject: Re: Postgres 13 signal 11: Segmentation fault tested on 2 independent machines In-reply-to: <247080.1603065654@sss.pgh.pa.us> References: <1603050466566-0.post@n3.nabble.com> <1603050580276-0.post@n3.nabble.com> <235509.1603051243@sss.pgh.pa.us> <1603051414438-0.post@n3.nabble.com> <236292.1603052323@sss.pgh.pa.us> <1603057047424-0.post@n3.nabble.com> <247080.1603065654@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 18 Oct 2020 20:00:54 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <247888.1603066736.1@sss.pgh.pa.us> Date: Sun, 18 Oct 2020 20:18:56 -0400 Message-ID: <247889.1603066736@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Oh, here's a simpler reproducer: create or replace function foo (out schemaname text, out relname text) returns setof record language sql as $$ select nspname, relname from pg_class c join pg_namespace n on (n.oid = relnamespace) order by 1 $$; select * from foo(); It doesn't fail without the ORDER BY, suggesting that the problem is localized in failing to handle the case where a sort key column needs to be coerced. regards, tom lane