Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCmYj-0002uW-34 for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Oct 2018 14:12:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gCmYg-0008Ug-Uv for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Oct 2018 14:12:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCmYg-0008UR-LF for pgsql-bugs@lists.postgresql.org; Wed, 17 Oct 2018 14:12:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCmYd-0007kM-Sr for pgsql-bugs@lists.postgresql.org; Wed, 17 Oct 2018 14:12:21 +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 w9HECF8a030132; Wed, 17 Oct 2018 10:12:15 -0400 From: Tom Lane To: emuser20140816@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15435: Infinite-recursive SQL procedure can crash a database server In-reply-to: <15435-299488dd5221754d@postgresql.org> References: <15435-299488dd5221754d@postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Wed, 17 Oct 2018 06:18:40 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30130.1539785535.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 17 Oct 2018 10:12:15 -0400 Message-ID: <30131.1539785535@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?utf-8?q?PG_Bug_reporting_form?=3D writes: > CREATE PROCEDURE proc1() LANGUAGE sql AS 'CALL proc1();'; > CALL proc1(); -- crash Works for me in 11.0, no doubt as a result of this last-minute fix: https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3Dd= b9034bf7653fa527e2531e1a713dbbd37066a6b =3D# CALL proc1(); ERROR: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 2= 048kB), after ensuring the platform's stack depth limit is adequate. CONTEXT: SQL function "proc1" statement 1 SQL function "proc1" statement 1 SQL function "proc1" statement 1 SQL function "proc1" statement 1 SQL function "proc1" statement 1 SQL function "proc1" statement 1 ... lots more ... regards, tom lane