Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Magnus Hagander
I have just realized that getrlimit(RLIMIT_STACK) is a pretty widely available syscall --- it's specified by the Single Unix Spec and the man pages claim it works on all the platforms I have handy to check. I propose that we make use of this call where available to prevent people

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: For win32, we set the stacksize in src/backend/Makefile with -Wl,--stack=4194304. So we know at build time what it is, if that helps you... Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. There's no way

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Magnus Hagander
For win32, we set the stacksize in src/backend/Makefile with -Wl,--stack=4194304. So we know at build time what it is, if that helps you... Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. If we do, we probably move it to a define (which

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. If we do, we probably move it to a define (which could just be in the Makefile) so we don't accidenally change one without the other, no? I think we'd

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: For win32, we set the stacksize in src/backend/Makefile with -Wl,--stack=4194304. So we know at build time what it is, if that helps you... Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. If we

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-07 Thread Tom Lane
I wrote: I have just realized that getrlimit(RLIMIT_STACK) is a pretty widely available syscall --- it's specified by the Single Unix Spec and the man pages claim it works on all the platforms I have handy to check. I propose that we make use of this call where available to prevent people