Re: BUG #15435: Infinite-recursive SQL procedure can crash a database server - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15435: Infinite-recursive SQL procedure can crash a database server
Date
Msg-id 30131.1539785535@sss.pgh.pa.us
Whole thread Raw
In response to BUG #15435: Infinite-recursive SQL procedure can crash a databaseserver  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #15435: Infinite-recursive SQL procedure can crash a database server
List pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> 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=postgresql.git;a=commitdiff;h=db9034bf7653fa527e2531e1a713dbbd37066a6b

=# CALL proc1();
ERROR:  stack depth limit exceeded
HINT:  Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack
depthlimit 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


pgsql-bugs by date:

Previous
From: neela
Date:
Subject: Fwd: Fwd: Re: General: Unable to start the postgresql after copyingpostgresql.log
Next
From: fn ln
Date:
Subject: Re: BUG #15435: Infinite-recursive SQL procedure can crash a database server