>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. PSA a patch. Best regards, ________________________________ 差出人: Alvaro Herrera <alvhe...@alvh.no-ip.org> 送信日時: 2024年10月11日 1:13 宛先: Sasaki, Yuto/佐佐木 悠人 <sasaki.yuto...@fujitsu.com> CC: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org> 件名: Re: ECPG Refactor: move sqlca variable in ecpg_log() On 2024-Oct-10, Yuto Sasaki (Fujitsu) wrote: > The sqlca variable in the ecpg_log() was declared with an unnecessarily wide > scope, so I moved to the appropriate place. 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. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ Voy a acabar con todos los humanos / con los humanos yo acabaré voy a acabar con todos (bis) / con todos los humanos acabaré ¡acabaré! (Bender)
change_scope.diff
Description: change_scope.diff