Re: Add “FOR UPDATE NOWAIT” lock details to the log.

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Yuki Seino <seinoyu(at)oss(dot)nttdata(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Date: 2025-05-30 15:28:49
Message-ID: 742f23aa-c063-4cc2-b483-7dfd84f716ad@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025/05/30 19:20, Peter Eisentraut wrote:
> On 14.03.25 16:07, Fujii Masao wrote:
>>>>> Instead, wouldn't it be simpler to update LockAcquireExtended() to
>>>>> take a new argument, like logLockFailure, to control whether
>>>>> a lock failure should be logged directly? I’ve adjusted the patch
>>>>> accordingly and attached it. Please let me know what you think!
>>>>>
>>>>> Regards,
>>>> Thank you!
>>>>
>>>> It's very simple and nice.
>>>> It seems like it can also handle other lock failure cases by extending logLockFailure.
>>>> > I agree with this propose.
>>>
>>> Thanks for reviewing the patch!
>>>
>>> I've made some minor cosmetic adjustments. The updated patch is attached.
>>>
>>> Unless there are any objections, I'll proceed with committing it.
>>
>> Pushed the patch. Thanks!
>
> This patch added a setting "log_lock_failure", but the existing similar setting "log_lock_waits" has a plural.  Is there a reason for this difference?

No, Seino-san and I went with log_lock_failure at the time because
we didn't have a better name suggestion, and we figured we could
revisit the GUC name later if needed. so thanks for bringing it up again!

>  Otherwise, maybe "log_lock_failures" would be better.

Yes, this seems better for consistency with log_lock_waits.

Regards,

--
Fujii Masao
NTT DATA Japan Corporation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-05-30 15:31:39 Re: Add CHECK_FOR_INTERRUPTS in polling loop code path in XactLockTableWait
Previous Message Antonin Houska 2025-05-30 15:02:11 Re: POC: Carefully exposing information without authentication