Re: Add “FOR UPDATE NOWAIT” lock details to the log. - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Date
Msg-id 797fbca7-e492-4433-adbb-3e70a0101e7e@oss.nttdata.com
Whole thread Raw
In response to Re: Add “FOR UPDATE NOWAIT” lock details to the log.  (Yuki Seino <seinoyu@oss.nttdata.com>)
List pgsql-hackers

On 2025/03/21 15:21, Yuki Seino wrote:
>> 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?

Yes, logging every autovacuum lock failure would be too noisy.
I was thinking that log_lock_failure should apply only to LOCK TABLE ... NOWAIT,
but per the current code, restricting it that way seems difficult.

Anyway, expanding log_lock_failure further requires more discussion and design work,
which isn't feasible within this CommitFest. So, I'm withdrawing the patch for now.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Regression test postgres_fdw might fail due to autovacuum
Next
From: Sami Imseih
Date:
Subject: Re: Proposal - Allow extensions to set a Plan Identifier