Re: ECPG Refactor: move sqlca variable in ecpg_log()
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: "Yuto Sasaki (Fujitsu)" <sasaki.yuto-00@fujitsu.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-16T09:52:40Z
Lists: 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
Commits
-
ecpg: Refactor ecpg_log() to skip unnecessary calls to ECPGget_sqlca().
- 7c4d3fe272f3 18.0 landed