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

Yuki Seino <seinoyu@oss.nttdata.com>

From: Yuki Seino <seinoyu@oss.nttdata.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>, Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-03-11T07:50:06Z
Lists: pgsql-hackers
>
> 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.


Regards,




Commits

  1. Rename log_lock_failure GUC to log_lock_failures for consistency.

  2. Add GUC option to log lock acquisition failures.

  3. Split ProcSleep function into JoinWaitQueue and ProcSleep