Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-12-01 Thread Robert Haas
On Thu, Dec 1, 2016 at 7:35 PM, Simon Riggs wrote: > On 2 December 2016 at 00:28, Robert Haas wrote: >> On Wed, Nov 30, 2016 at 6:50 AM, Simon Riggs wrote: >>> Obtaining a tuple lock requires two separate actions: First we do

Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-12-01 Thread Simon Riggs
On 2 December 2016 at 00:28, Robert Haas wrote: > On Wed, Nov 30, 2016 at 6:50 AM, Simon Riggs wrote: >> Obtaining a tuple lock requires two separate actions: First we do >> LockTuple() and then we do XactLockTableWait(). > > I think that's kind of a

Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-12-01 Thread Robert Haas
On Wed, Nov 30, 2016 at 6:50 AM, Simon Riggs wrote: > Obtaining a tuple lock requires two separate actions: First we do > LockTuple() and then we do XactLockTableWait(). I think that's kind of a confusing way of looking at it. LockTuple() waits for a "tuple" lmgr lock,

Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-11-30 Thread Simon Riggs
On 29 November 2016 at 19:03, Amit Kapila wrote: > how will we distinguish it when some > process is actually waiting on tuple lock? The point is that both those actions are waiting for a tuple lock. Obtaining a tuple lock requires two separate actions: First we do

Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-11-29 Thread Robert Haas
On Tue, Nov 29, 2016 at 6:26 AM, Simon Riggs wrote: > New (9.4) XactLockTableWait() sets the reason for the wait, so that if > we emit a log message then it will produce a log message to say its > not waiting on a transaction, its waiting on a lock. > > Nice. log_lock_waits

Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-11-29 Thread Amit Kapila
On Tue, Nov 29, 2016 at 4:56 PM, Simon Riggs wrote: > New (9.4) XactLockTableWait() sets the reason for the wait, so that if > we emit a log message then it will produce a log message to say its > not waiting on a transaction, its waiting on a lock. > > Nice. log_lock_waits