Re: [HACKERS] Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

2016-09-05 Thread Julien Rouhaud
On 05/09/2016 11:55, Julien Rouhaud wrote: > On 20/06/2016 06:28, Thomas Munro wrote: >> On Mon, Jun 20, 2016 at 3:43 PM, Craig Ringer wrote: >>> On 18 June 2016 at 11:28, Thomas Munro >>> wrote: Several times now when reading, debugging and writing code I've wished that LWLockHeldByMe

Re: [HACKERS] Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

2016-09-05 Thread Julien Rouhaud
On 20/06/2016 06:28, Thomas Munro wrote: > On Mon, Jun 20, 2016 at 3:43 PM, Craig Ringer wrote: >> On 18 June 2016 at 11:28, Thomas Munro >> wrote: >>> Several times now when reading, debugging and writing code I've wished >>> that LWLockHeldByMe assertions specified the expected mode, especially

Re: [HACKERS] Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

2016-09-05 Thread Simon Riggs
On 18 June 2016 at 04:28, Thomas Munro wrote: > Hi hackers, > > Several times now when reading, debugging and writing code I've wished > that LWLockHeldByMe assertions specified the expected mode, especially > where exclusive locking is required. > > What do you think about something like the atta

Re: [HACKERS] Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

2016-06-19 Thread Thomas Munro
On Mon, Jun 20, 2016 at 3:43 PM, Craig Ringer wrote: > On 18 June 2016 at 11:28, Thomas Munro > wrote: >> Several times now when reading, debugging and writing code I've wished >> that LWLockHeldByMe assertions specified the expected mode, especially >> where exclusive locking is required. >> >>

Re: [HACKERS] Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

2016-06-19 Thread Craig Ringer
On 18 June 2016 at 11:28, Thomas Munro wrote: > Hi hackers, > > Several times now when reading, debugging and writing code I've wished > that LWLockHeldByMe assertions specified the expected mode, especially > where exclusive locking is required. > > What do you think about something like the att

[HACKERS] Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

2016-06-17 Thread Thomas Munro
Hi hackers, Several times now when reading, debugging and writing code I've wished that LWLockHeldByMe assertions specified the expected mode, especially where exclusive locking is required. What do you think about something like the attached? See also an example of use. I will add this to the