Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Yuki Seino <seinoyu@oss.nttdata.com>
From: Seino Yuki <seinoyu@oss.nttdata.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-10-18T10:07:28Z
Lists: pgsql-hackers
Attachments
- v4-0001_add_loginfo_nowait.patch (text/x-diff) patch v4
> The choice between adding a new GUC or extending the existing one > (e.g., log_lock_waits) > is debatable, but I prefer the latter. I'm considering extending > log_lock_waits > to accept a value like "fail". If set to "on" (the current behavior), > detailed logs are generated when the lock wait time exceeds > deadlock_timeout. > If set to "fail", logs are generated whenever a lock wait fails. If > both are > specified, logs would be triggered when the wait time exceeds > deadlock_timeout or > when a lock wait fails. Thanks for the idea. Changed log_lock_waits to an enum type and added fail and all. "off" : No log message(default). "on" : If over deadlock_timeout(the current behavior). "fail" : If lock failed. "all" : All pettern. I struggled with the name "on," but decided to leave it by compatibility.
Commits
-
Rename log_lock_failure GUC to log_lock_failures for consistency.
- 73bdcfab35ec 18.0 landed
-
Add GUC option to log lock acquisition failures.
- 6d376c3b0d1e 18.0 landed
-
Split ProcSleep function into JoinWaitQueue and ProcSleep
- 3c0fd64fec8e 18.0 cited