Re: ECPG Refactor: move sqlca variable in ecpg_log() - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: ECPG Refactor: move sqlca variable in ecpg_log()
Date
Msg-id c2c7d315-2f7d-4f34-b50f-cf5e237b5ecd@oss.nttdata.com
Whole thread Raw
In response to Re: ECPG Refactor: move sqlca variable in ecpg_log()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers

On 2024/10/16 15:04, Yuto Sasaki (Fujitsu) wrote:
>  >Hmm, I'm not sure we want that, because if we do this, then
>  >ECPGget_sqlca() gets run with the debug_mutex held.  In the original
>  >coding, it's run without the mutex.
> 
> Thank you for pointing that out. I agree with your observation. But there is
> another room for improvement - we can avoid unnecessary calls to ECPGget_sqlca()
> by moving just before mutex lock.

+1

> PSA a patch.

The patch looks good to me.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Enable data checksums by default
Next
From: Bertrand Drouvot
Date:
Subject: Re: BF mamba failure