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.
This commit is contained in:
Tom Lane
2010-11-06 16:50:18 -04:00
parent 6736916f5f
commit dd1c781903
4 changed files with 12 additions and 8 deletions

View File

@ -3211,7 +3211,7 @@ $$ language plpgsql;
create function sql_recurse(float8) returns float8 as
$$ select recurse($1) limit 1; $$ language sql;
select recurse(5);
select recurse(10);
create function error1(text) returns text language sql as
$$ SELECT relname::text FROM pg_class c WHERE c.oid = $1::regclass $$;