Markus Schiltknecht wrote:
> Hello Alvaro,
> 
> yeah, thanks, that's it. postgresql.conf had:
> 
> max_stack_depth = 8192                  # min 100, size in KB
> 
> I don't know who put it at 8192. According to the fine manual at [1], it 
> should be set to something below 'ulimit -s', which gives 8192 on the 
> machine in question. I've now set it to 7000 and I also get a warning 
> instead of a SEGFAULT.

I notice it crashes with max_stack_depth set to 8173, but correctly
detects the error with max_stack_depth set to 8172.  The doc suggests a
safety margin of "a megabyte or so", so I think we are conforming to our
docs here.

Tom recently added a check for getrlimit(RLIMIT_STACK), but I don't know
if that considered the "megabyte or so".  *peeks the code*  Yeah,
there's a 512 kb "daylight", but there's also an absolute maximum of
2MB.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to