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

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: "Yuto Sasaki (Fujitsu)" <sasaki(dot)yuto-00(at)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ECPG Refactor: move sqlca variable in ecpg_log()
Date: 2024-10-16 09:52:40
Message-ID: c2c7d315-2f7d-4f34-b50f-cf5e237b5ecd@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2024-10-16 10:11:08 Re: BF mamba failure
Previous Message Daniel Gustafsson 2024-10-16 08:01:37 Re: Enable data checksums by default