Re: [HACKERS] A question regarding LWLock in ProcSleep

2015-12-21 Thread Kenan Yao
+Heikki, Hi Heikki, Could you please help provide a case to elaborate why we need the LWLock here? or could you please tell me to whom should I ask this question? Thanks, Kenan On Tue, Dec 22, 2015 at 11:41 AM, Kenan Yao wrote: > Hi Amit, > > Thanks for the reply! > > Yes, in LockAcquireExten

Re: [HACKERS] A question regarding LWLock in ProcSleep

2015-12-21 Thread Kenan Yao
Hi Amit, Thanks for the reply! Yes, in LockAcquireExtended, after exiting WaitOnLock, there would be a read access to proclock, however, since the lock has either been granted or rejected by deadlock check, I can think of no possible concurrent write access to the proclock, so is it really necess

Re: [HACKERS] A question regarding LWLock in ProcSleep

2015-12-18 Thread Amit Kapila
On Thu, Dec 17, 2015 at 1:51 PM, Kenan Yao wrote: > Hi there, > > In function ProcSleep, after the process has been waken up, either with > lock granted or deadlock detected, it would re-acquire the lock table's > partition LWLock. > > The code episode is here: > > /* > * Re-acquire the lock

[HACKERS] A question regarding LWLock in ProcSleep

2015-12-17 Thread Kenan Yao
Hi there, In function ProcSleep, after the process has been waken up, either with lock granted or deadlock detected, it would re-acquire the lock table's partition LWLock. The code episode is here: /* * Re-acquire the lock table's partition lock. We have to do this to hold * off cance