Re: 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: Re: Checking max_stack_depth automatically
Date: 2006-10-07 20:23:53
Message-ID: 4479.1160252633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 from setting max_stack_depth larger than, say, the current
> stack rlimit less half a megabyte.

I've committed changes along this line, and am now wondering whether
there isn't some equivalent to getrlimit(RLIMIT_STACK) on Windows
(I somehow doubt that the syscall exists as such ;-)). If someone
can provide a patch to postgres.c's new get_stack_depth_rlimit()
function, please do.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-07 20:34:10 Re: libreadline only used with psql?
Previous Message Tom Lane 2006-10-07 20:20:02 Re: FailedAssertion() in 8.2beta1