Add “FOR UPDATE NOWAIT” lock details to the log.
Yuki Seino <seinoyu@oss.nttdata.com>
From: Seino Yuki <seinoyu@oss.nttdata.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-09-13T11:49:36Z
Lists: pgsql-hackers
Attachments
- add_loginfo_nowait.patch (text/x-diff) patch
Hello, I would like to add the information of the PID that caused the failure when acquiring a lock with "FOR UPDATE NOWAIT". When "FOR UPDATE" is executed and interrupted by lock_timeout, xid and PID are output in the logs, but in the case of "FOR UPDATE NOWAIT", no information is output, making it impossible to identify the cause of the lock failure. Therefore, I would like to output information in the logs in the same way as when "FOR UPDATE" is executed and interrupted by lock_timeout. The patch is attached as well. Regards, -- Yuki Seino NTT DATA CORPORATION
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