Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIobR-00AWws-Mj for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Dec 2023 11:31:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rIobO-00FKgb-BS for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Dec 2023 11:31:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIoZO-00FDoG-LM for pgsql-hackers@lists.postgresql.org; Thu, 28 Dec 2023 11:28:58 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIoZL-00CanO-NY for pgsql-hackers@lists.postgresql.org; Thu, 28 Dec 2023 11:28:57 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id DDE516078E; Thu, 28 Dec 2023 20:28:50 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 28 Dec 2023 20:28:50 +0900 From: Shinya Kato To: Laurenz Albe Cc: Robert Haas , pgsql-hackers@lists.postgresql.org Subject: Re: Set log_lock_waits=on by default In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.11 Message-ID: <4530a101c4d17174582b07875ead600d@oss.nttdata.com> X-Sender: Shinya11.Kato@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-12-22 20:00, Laurenz Albe wrote: > My point is that in the vast majority of cases, long lock waits > indicate a problem that you would like to know about, so the parameter > should default to "on". +1. I always set log_lock_waits=on, so I agree with this. >> Just a random idea but what if we separated log_lock_waits from >> deadlock_timeout? Say, it becomes time-valued rather than >> Boolean-valued, but it has to be >= deadlock_timeout? Because I'd >> probably be more interested in hearing about a lock wait that was more >> than say 10 seconds, but I don't necessarily want to wait 10 seconds >> for the deadlock detector to trigger. > > That is an appealing thought, but as far as I know, "log_lock_waits" > is implemented by the deadlock detector, which is why it is tied to > "deadlock_timeout". So if we want that, we'd need a separate "live > lock detector". I don't know if we want to go there. Personally, I thought it was a good idea to separate log_lock_waits and deadlock_timeout, but I have not checked how that is implemented. -- Regards, Shinya Kato NTT DATA GROUP CORPORATION