Re: max_stack_depth problem though query is substantially smaller - Mailing list pgsql-general

From Tom Lane
Subject Re: max_stack_depth problem though query is substantially smaller
Date
Msg-id 12324.1460125227@sss.pgh.pa.us
Whole thread Raw
In response to max_stack_depth problem though query is substantially smaller  ("Charles Clavadetscher" <clavadetscher@swisspug.org>)
Responses Re: max_stack_depth problem though query is substantially smaller
List pgsql-general
"Charles Clavadetscher" <clavadetscher@swisspug.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


pgsql-general by date:

Previous
From: Scott Mead
Date:
Subject: Re: Postgresql 9.3.4 file system compatibility
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Transitioning to a SQL db