Checking max_stack_depth automatically

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Checking max_stack_depth automatically
Date: 2006-10-07 17:08:58
Message-ID: 20339.1160240938@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 from setting max_stack_depth larger than, say, the current
stack rlimit less half a megabyte. This will prevent pilot error
such as here:
http://archives.postgresql.org/pgsql-bugs/2006-10/msg00053.php

It'd be even nicer to not have a max_stack_depth GUC at all, but
it's probably untenable to assume that getrlimit is available on
every platform.

Thoughts?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Campbell 2006-10-07 17:20:30 libreadline only used with psql?
Previous Message Tom Lane 2006-10-07 16:47:56 Re: FailedAssertion() in 8.2beta1