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.
regards, tom lane