Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-22 Thread Fujii Masao
On 2024/10/21 23:25, Fujii Masao wrote: On 2024/10/19 2:43, Tom Lane wrote: Fujii Masao writes: I've attached the latest version of the patch, now including the commit log. Unless there are any objections, I'll proceed with committing it. LGTM.  Maybe move down the sqlca variable declar

Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-21 Thread Fujii Masao
On 2024/10/19 2:43, Tom Lane wrote: Fujii Masao writes: I've attached the latest version of the patch, now including the commit log. Unless there are any objections, I'll proceed with committing it. LGTM. Maybe move down the sqlca variable declaration, so that the declarations still match

Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-18 Thread Tom Lane
Fujii Masao writes: > I've attached the latest version of the patch, now including the commit log. > Unless there are any objections, I'll proceed with committing it. LGTM. Maybe move down the sqlca variable declaration, so that the declarations still match the order in which the variables are i

Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-17 Thread Fujii Masao
On 2024/10/16 18:52, Fujii Masao wrote: 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 ou

Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-16 Thread Fujii Masao
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 ther

Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-15 Thread Yuto Sasaki (Fujitsu)
ment - we can avoid unnecessary calls to ECPGget_sqlca() by moving just before mutex lock. PSA a patch. Best regards, 差出人: Alvaro Herrera 送信日時: 2024年10月11日 1:13 宛先: Sasaki, Yuto/佐佐木 悠人 CC: pgsql-hackers@lists.postgresql.org 件名: Re: ECPG Refactor: move sqlca variable in

Re: ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-10 Thread Alvaro Herrera
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 origina

ECPG Refactor: move sqlca variable in ecpg_log()

2024-10-09 Thread Yuto Sasaki (Fujitsu)
The sqlca variable in the ecpg_log() was declared with an unnecessarily wide scope, so I moved to the appropriate place. Please see attached. scope.diff Description: scope.diff