From: | "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PGSQL Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: <IDLE> and waiting |
Date: | 2008-02-02 23:33:58 |
Message-ID: | 65937bea0802021533o4bcc3483pfdf4882e6b52a58e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Feb 2, 2008 3:27 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Gurjeet Singh escribió:
>
> > I just looked at the patch... Isn't PG_TRY() an expensive call to make
> in
> > the lock.c code? I was thinking of registering a Xact callback using
> > RegisterXactCallback() and performing 'waiting' reset in that callback
> if
> > the Xact event is XACT_EVENT_ABORT.
>
> PG_TRY is not expensive as all that -- it's just a sigsetjmp() call and
> another stack frame.
>
>
Thats why I asked. I assumed that creating stacks was expensive. Isn't this
the reason the compilers came up with the function inline capability; to
avoid stacks, because they can be expensive. Or am I confusing two different
types of stacks!
Moreover, calling a callback, once in a while (only upon XACT abort), may
prove to be much cheaper than setting up an additional stack on every
lock-acquire call.
Really, my 2 cents.
--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco *
Mail sent from my BlackLaptop device
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-02-02 23:39:39 | Re: <IDLE> and waiting |
Previous Message | Alvaro Herrera | 2008-02-02 23:27:57 | Re: <IDLE> and waiting |