On platforms that have getrlimit(RLIMIT_STACK), use it to ensure that
Tom Lane <tgl@sss.pgh.pa.us>
On platforms that have getrlimit(RLIMIT_STACK), use it to ensure that max_stack_depth is not set to an unsafe value. This commit also provides configure-time checking for <sys/resource.h>, and cleans up some perhaps-unportable code associated with use of that include file and getrlimit().
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +4 −2 |
| configure.in | modified | +3 −3 |
| contrib/pgbench/pgbench.c | modified | +10 −9 |
| doc/src/sgml/config.sgml | modified | +25 −17 |
| src/backend/tcop/postgres.c | modified | +56 −15 |
| src/backend/utils/misc/guc.c | modified | +25 −3 |
| src/include/pg_config.h.in | modified | +6 −0 |
| src/include/tcop/tcopprot.h | modified | +5 −1 |
| src/include/utils/pg_rusage.h | modified | +2 −2 |