From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: default of max_stack_depth |
Date: | 2010-08-06 14:22:59 |
Message-ID: | AANLkTinUWCRay=qpDt2X58gifXYy-iRMyQyEu=GC94LS@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 6, 2010 at 11:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
>> The document says that the max_stack_depth is 2MB by default.
>> OTOH, in the source code, the variable max_stack_depth is
>> initialized with 100 (kB), and guc.c also uses 100 as the
>> default. Why?
>
> The initial value needs to be small until we have been able to probe
> rlimit and figure out what is safe.
Thanks! How about adding the comment about that as follows?
*** a/src/backend/utils/misc/guc.c
--- b/src/backend/utils/misc/guc.c
***************
*** 1520,1525 **** static struct config_int ConfigureNamesInt[] =
--- 1520,1531 ----
16384, 1024, MAX_KILOBYTES, NULL, NULL
},
+ /*
+ * Note: the real default of max_stack_depth is calculated in
+ * InitializeGUCOptions(). We use 100 as the sufficiently small
+ * initial value until we have been able to probe rlimit and
+ * figure out what is safe.
+ */
{
{"max_stack_depth", PGC_SUSET, RESOURCES_MEM,
gettext_noop("Sets the maximum stack depth, in
kilobytes."),
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-08-06 14:31:03 | Re: postgres 9.0 crash when bringing up hot standby |
Previous Message | Mike Fowler | 2010-08-06 14:12:08 | Re: Initial review of xslt with no limits patch |