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-21T06:21:57Z
Lists: pgsql-hackers
> Pushed the patch. Thanks! Thank you. I'm very happy !! > Using the newly introduced mechanism, we can now easily extend > the log_lock_failure GUC to support additional NOWAIT lock failures, > such as LOCK TABLE ... NOWAIT, ALTER TABLE ... NOWAIT, > ALTER MATERIALIZED VIEW ... NOWAIT, and ALTER INDEX ... NOWAIT. > > I've attached a patch implementing this. That's a very good suggestion. There is just one thing that bothers me. ConditionalLockRelationOid() seems to be used by autovacuum as well. Wouldn't this information be noise to the user? Regards,
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