Re: Suppressing elog.c context messages (was Re: [HACKERS] Wait free LW_SHARED acquisition)

2015-01-26 Thread Andres Freund
On 2015-01-26 18:30:13 -0600, Jim Nasby wrote: > On 12/23/14 11:41 AM, Andres Freund wrote: > >I think it'd generally be useful to have something like errhidecontext() > >akin to errhidestatement() to avoid things like the above. > > > >>> > >>>Under this proposal, do you want to sup

Re: Suppressing elog.c context messages (was Re: [HACKERS] Wait free LW_SHARED acquisition)

2015-01-26 Thread Jim Nasby
On 12/23/14 11:41 AM, Andres Freund wrote: > >I think it'd generally be useful to have something like errhidecontext() > >akin to errhidestatement() to avoid things like the above. > > > >Under this proposal, do you want to suppress the context/statement >unconditionally or via some hook/variabl

Re: Suppressing elog.c context messages (was Re: [HACKERS] Wait free LW_SHARED acquisition)

2014-12-23 Thread Andres Freund
On 2014-12-22 10:35:35 +0530, Amit Kapila wrote: > On Fri, Dec 19, 2014 at 9:36 PM, Andres Freund > wrote: > > > > Hi, > > > > When debugging lwlock issues I found PRINT_LWDEBUG/LOG_LWDEBUG rather > > painful to use because of the amount of elog contexts/statements > > emitted. Given the number of

Re: Suppressing elog.c context messages (was Re: [HACKERS] Wait free LW_SHARED acquisition)

2014-12-21 Thread Amit Kapila
On Fri, Dec 19, 2014 at 9:36 PM, Andres Freund wrote: > > Hi, > > When debugging lwlock issues I found PRINT_LWDEBUG/LOG_LWDEBUG rather > painful to use because of the amount of elog contexts/statements > emitted. Given the number of lwlock acquirations that's just not doable. > > To solve that du

Suppressing elog.c context messages (was Re: [HACKERS] Wait free LW_SHARED acquisition)

2014-12-19 Thread Andres Freund
Hi, When debugging lwlock issues I found PRINT_LWDEBUG/LOG_LWDEBUG rather painful to use because of the amount of elog contexts/statements emitted. Given the number of lwlock acquirations that's just not doable. To solve that during development I've solved that by basically replacing: if (Tra