Re: max_stack_depth problem though query is substantially smaller

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org>
Cc: pgsql-general(at)postgresql(dot)org, "Bannert Matthias" <bannert(at)kof(dot)ethz(dot)ch>
Subject: Re: max_stack_depth problem though query is substantially smaller
Date: 2016-04-08 14:20:27
Message-ID: 12324.1460125227@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org> writes:
> When R processes the daily time serie we get a stack size exceeded
error, followed by the hint to increase the max_stack_depth.

Postgres doesn't generally allocate large values on the stack, and I doubt
that R does either. Almost certainly, what is causing this is not data
size per se but unreasonable call nesting depth in your R code. You may
have a function that's actually in infinite recursion, or maybe it's
recursing to a depth governed by the number of data elements. If so,
consider revising it into iteration with an explicitly-represented state
stack.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Mead 2016-04-08 14:20:37 Re: Postgresql 9.3.4 file system compatibility
Previous Message Merlin Moncure 2016-04-08 14:09:22 Re: what database schema version management system to use?