Martin Pitt <[EMAIL PROTECTED]> writes: > I recently got the Debian bug report below, a server crash with huge > IN clauses.
What this sounds like to me is someone increasing max_stack_depth without understanding what he's doing. You must make sure that max_stack_depth is less than the "ulimit -s" setting the postmaster is running under ... and not just a little bit less, you want a megabyte or so of daylight in there. Per the documentation: max_stack_depth (integer) Specifies the maximum safe depth of the server's execution stack. The ideal setting for this parameter is the actual stack size limit enforced by the kernel (as set by ulimit -s or local equivalent), less a safety margin of a megabyte or so. The safety margin is needed because the stack depth is not checked in every routine in the server, but only in key potentially-recursive routines such as expression evaluation. Setting the parameter higher than the actual kernel limit will mean that a runaway recursive function can crash an individual backend process. The default setting is 2048 KB (two megabytes), which is conservatively small and unlikely to risk crashes. However, it may be too small to allow execution of complex functions. So if the OP wants to use huge IN clauses, he has to both increase max_stack_depth and adjust the ulimit that the postmaster runs under. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster