Re: Should we have an optional limit on the recursion depth of recursive CTEs?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should we have an optional limit on the recursion depth of recursive CTEs?
Date: 2011-08-15 20:31:35
Message-ID: 9039.1313440295@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <peter(at)2ndquadrant(dot)com> writes:
> Should we have an optional, disabled-by-default limit on the
> recursion/iteration depth of recursive CTEs to guard against stupid
> queries that loop ad infinitum?

I think not ...

> I'd suggest that an appropriate interface would be an int GUC with a
> GucContext of PGC_SUSET, so that DBAs can impose system-wide limits.

... and that would be a seriously bad API. There are not SUSET
restrictions on other resources such as work_mem. Why do we need
one for this?

By and large, this sounds like a solution looking for a problem.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-08-15 21:32:06 Re: walprotocol.h vs frontends
Previous Message Jim Nasby 2011-08-15 20:07:03 Re: Compressing the AFTER TRIGGER queue