Skip site navigation (1) Skip section navigation (2)

Re: server crash on recursive function invocation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ali Baba <idofyear(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: server crash on recursive function invocation
Date: 2006-06-01 01:55:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Ali Baba <idofyear(at)yahoo(dot)com> writes:
> i was just trying recursive function invocation and got a server crash when i changed a GUC variable max_stack_depth,  to a high number. 

There's a reason why that variable is a superuser-only setting: you're
supposed to have some clue what you're doing when you change it ;-)

If you need more stack space, what you generally have to do is adjust
the ulimit setting that the postmaster is started under.  You can set
max_stack_depth up to a few hundred K less than the postmaster's
ulimit -s setting, but not more.

(We wouldn't even have the variable if there were a sufficiently
portable way to find out the ulimit stack depth automatically, but
there's not one that I know of.)

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-06-01 05:12:43
Subject: Re: [HACKERS] psql \copy warning
Previous:From: Andrew DunstanDate: 2006-06-01 00:27:24
Subject: Re: server crash on recursive function invocation

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group