Re: [RFC] obtaining the function call stack

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] obtaining the function call stack
Date: 2009-07-13 19:33:42
Message-ID: 28619.1247513622@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> The performance and error recovery implications are unfavorable.
>> Just how badly do you need this, and for what?

> Mainly for debugging. The situation is such that there is a lot of
> functions and very high load. The functions have embedded "debug elogs"
> and the intention is to call them only if the function was called in a
> particular context.

I can't really see that as sufficiently widely useful to justify
inserting such a mechanism.

I suspect also that you are defining the problem the wrong way --- this
user doesn't want a generic fmgr call stack, he wants a plpgsql stack.
Which is something the plpgsql debugger could be taught to do, if it
doesn't already, thus avoiding the overhead the 99.9% of the time that
you don't need it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-07-13 19:36:13 Re: [RFC] obtaining the function call stack
Previous Message Peter Eisentraut 2009-07-13 19:32:55 Alpha release process