Skip site navigation (1) Skip section navigation (2)

Re: Maximum function call nesting depth for regression tests

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Maximum function call nesting depth for regression tests
Date: 2010-10-31 18:44:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Oct 30, 2010 at 10:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> A few days ago I added a regression test that involves a plpgsql
> function calling a sql function, which recurses back to the plpgsql
> function, etc, to a depth of 10 cycles (ie 10 plpgsql function calls
> and 10 sql function calls).  There are three buildfarm members that
> are failing with "stack depth limit exceeded" errors on this test.
> What should we do about that?  Possibilities include:
> 1. Back off the recursion nesting depth of the test to whatever
> it takes to get those buildfarm critters happy.
> 2. Lobby the buildfarm owners to increase their ulimit -s settings.
> 3. Chisel things enough to get the case to pass, eg by reducing the
> no-doubt-generous value of STACK_DEPTH_SLOP.
> I don't especially care for choice #1.  To me, one of the things that
> the regression tests ought to flag is whether a machine is so limited
> that "reasonable" coding might fail.  If you can't do twenty or so
> levels of function call you've got a mighty limited machine.

Agreed.  So how much stack space does 10 or 20 nested calls actually use?

Robert Haas
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-10-31 19:10:07
Subject: Re: ALTER OBJECT any_name SET SCHEMA name
Previous:From: Pavel StehuleDate: 2010-10-31 18:43:07
Subject: Re: type info refactoring

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group