Re: and waiting - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Re: and waiting
Date
Msg-id 65937bea0802021533o4bcc3483pfdf4882e6b52a58e@mail.gmail.com
Whole thread Raw
In response to Re: and waiting  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
On Feb 2, 2008 3:27 PM, Alvaro Herrera <<a
href="mailto:alvherre@commandprompt.com">alvherre@commandprompt.com</a>>wrote:<br /><div
class="gmail_quote"><blockquoteclass="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt
0pt0.8ex; padding-left: 1ex;"> Gurjeet Singh escribió:<br /><div class="Ih2E3d"><br />> I just looked at the
patch...Isn't PG_TRY() an expensive call to make in<br />> the lock.c code? I was thinking of registering a Xact
callbackusing<br />> RegisterXactCallback() and performing 'waiting' reset in that callback if<br /> > the Xact
eventis XACT_EVENT_ABORT.<br /><br /></div>PG_TRY is not expensive as all that -- it's just a sigsetjmp() call and<br
/>anotherstack frame.<br /><font color="#888888"><br /></font></blockquote></div><br clear="all" /> Thats why I asked.
Iassumed 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!<br /><br
/>Moreover,calling a callback, once in a while (only upon XACT abort), may prove to be much cheaper than setting up an
additionalstack on every lock-acquire call.<br /><br />Really, my 2 cents.<br /><br />-- <br
/>gurjeet[.singh]@EnterpriseDB.com<br/> singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com<br /><br
/>EnterpriseDB     <a href="http://www.enterprisedb.com">http://www.enterprisedb.com</a><br /><br />17° 29' 34.37"N,  
78°30' 59.76"E - Hyderabad<br /> 18° 32' 57.25"N,   73° 56' 25.42"E - Pune<br />37° 47' 19.72"N, 122° 24' 1.69" W - San
Francisco*<br /><br /><a href="http://gurjeet.frihost.net">http://gurjeet.frihost.net</a><br /><br />Mail sent from my
BlackLaptopdevice  

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: and waiting
Next
From: Tom Lane
Date:
Subject: Re: and waiting