Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Valery Popov <v(dot)popov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)
Date: 2015-10-28 14:48:35
Message-ID: 20748.1446043715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2015-10-28 14:33 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> Also, there are already ways to constrain queries-gone-crazy; particularly
>> statement_timeout, which has the advantage that it works for other types
>> of badly-written queries not only this one.

> isn't the recursive limits much more a resource limit like work_mem etc?

Exceeding work_mem isn't generally supposed to result in an error --- it
causes, or should cause, the system to shift execution strategy so that
you get the same answer with less memory and more time consumption.

In any case, the question is what purpose this would serve that isn't
already covered perfectly well by existing features like
statement_timeout.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-10-28 14:55:00 Re: [DESIGN] ParallelAppend
Previous Message Pavel Stehule 2015-10-28 14:36:42 Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)