]> granicus.if.org Git - postgresql/commit
Make get_stack_depth_rlimit() handle RLIM_INFINITY more sanely.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 6 Nov 2010 20:50:18 +0000 (16:50 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 6 Nov 2010 20:50:18 +0000 (16:50 -0400)
commitdd1c781903811416db4e03383a4cb0bfc8cfac40
tree95189e98f3f3663cfa4b4bf8904e36a1ca4aa4c8
parent6736916f5f5a5f340aa20d4b27540764b5646585
Make get_stack_depth_rlimit() handle RLIM_INFINITY more sanely.

Rather than considering this result as meaning "unknown", report LONG_MAX.
This won't change what superusers can set max_stack_depth to, but it will
cause InitializeGUCOptions() to set the built-in default to 2MB not 100kB.
The latter seems like a fairly unreasonable interpretation of "infinity".
Per my investigation of odd buildfarm results as well as an old complaint
from Heikki.

Since this should persuade all the buildfarm animals to use a reasonable
stack depth setting during "make check", revert previous patch that dumbed
down a recursive regression test to only 5 levels.
src/backend/tcop/postgres.c
src/backend/utils/misc/guc.c
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql