Re: additional patch for contrib/tablefunc - added to - Mailing list pgsql-patches

From Tom Lane
Subject Re: additional patch for contrib/tablefunc - added to
Date
Msg-id 20789.1033099419@sss.pgh.pa.us
Whole thread Raw
In response to Re: additional patch for contrib/tablefunc - added to  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> Gavin Sherry wrote:
>> ... However, if you bust the infinite recursion
>> detection it will, by definition, recurse infinitely and not elog() -- at
>> least in a reasonably time frame.
>>
>> To handle this situation, you may need to use the psql timeout
>> functionality -- but I know nothing about it.

> I think you finally got through my thick skull. Now I see the
> issue. OK, I'll  rework the patch using a timeout.

I think this is unnecessary.  Bugs in any functionality tested by a
regression test could cause the system to go into an infinite loop;
but we don't put timeouts on all of them.  In practice we rely on
the user to exercise some judgment about whether the tests are
proceeding normally.

I think a timeout is more likely to create problems than fix them;
how will you pick a platform-independent, system-load-independent
timeout value, for example?

Also, in my experience an infinite-recursion bug generally results
in a pretty quick stack overflow and core dump, so a timeout per se
wouldn't be needed anyway.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Cascaded Column Drop
Next
From: Joe Conway
Date:
Subject: Re: additional patch for contrib/tablefunc - added to