Re: Default of max_stack_depth and getrlimit - Mailing list pgsql-hackers

From Cédric Villemain
Subject Re: Default of max_stack_depth and getrlimit
Date
Msg-id 200807211807.28526.cedric.villemain@dalibo.com
Whole thread Raw
In response to Default of max_stack_depth and getrlimit  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: Default of max_stack_depth and getrlimit  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-hackers
Le Monday 21 July 2008, Heikki Linnakangas a écrit :
> In 8.2, we started to use getrlimit(RLIMIT_STACK, ...) to set
> max_stack_depth automatically, to a max of 2MB:
>
> http://archives.postgresql.org/pgsql-hackers/2006-10/msg00389.php
>
> However, it's not behaving as I expected when the stack limit is set to
> "unlimited". I would expect max_stack_depth to be set to the max of 2MB,
> but instead it gets set to 100kB.
>
> I don't normally run without a limit, but it looks like the regression
> tests run like that with "make check", at least on my platform. I bumped
> into this while running a custom regression test with very deep nesting.
>
> I think we should differentiate between "infinite" and "unknown" in the
> return value of get_stack_depth_limit(), and use max_stack_depth of 2MB
> in case of infinite, and fall back to the 100kB only in the unknown case.

Why 2MB ? I believed that 3.5MB is the effective good maximum , is that too
much ?

>
> --
>    Heikki Linnakangas
>    EnterpriseDB   http://www.enterprisedb.com



--
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: Default of max_stack_depth and getrlimit