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 1uvRm6-00Dmts-3I for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Sep 2025 02:38:35 +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 1uvRm3-001Rvo-Cj for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Sep 2025 02:38:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uvRm3-001Rss-0S for pgsql-hackers@lists.postgresql.org; Mon, 08 Sep 2025 02:38:31 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uvRlx-0017en-20 for pgsql-hackers@lists.postgresql.org; Mon, 08 Sep 2025 02:38:29 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7723f0924a3so5205384b3a.2 for ; Sun, 07 Sep 2025 19:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757299104; x=1757903904; darn=lists.postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=NlBOj1V5mB9bK8DWA/5lBFDDBGlEQ98gx5QUP3TiwZ0=; b=OcyRdfB1xZzP0ZcVAI60QKd4R5Mop6N18nHhCbp8rTiZFx907GOXhdUEtrCamSr1vu 9xV8KXflO+BFyLWLNWwruAN7pdglqSF8tlmNes4PV9uzHFZCIH8YghWNGl4ytfrBWfPH rub8Z6ZzryHd/IiTbuh2aHLa4bIGJO/VizPijV3OsF83YG58mZ6FcKMaP82VS8dQ3VDf kcfDTRcgEC0KXOFyhnBXu1K+pvoLIjtFOmLCOMcIJaArs2/w5Fnp8SfB8+E3LcdqbFlE U/tM0GvyL3mLMtZX3ERWdMyPr2Wv+EBSlwi6elI6BNeBBwFvWjNz4+dml6VPi1TIH7NY ikBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757299104; x=1757903904; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NlBOj1V5mB9bK8DWA/5lBFDDBGlEQ98gx5QUP3TiwZ0=; b=Byv69Kra1IvvnOwNIE9motlrPuR0yUYeoy27bqBHxB+evacGSz2BWJnsNTMii0xeIB igFxNpnfgyapxAo2YlKpvddfS/yiCQlOvCGFxYg/RTa4oblsH+cts1oTAXxvDbKqS6FZ bnvvMjKOQ1qgRjFPwWbN15c4m4z0s4+vpar5cp64b6MIb7rqhRjFBqZPgvTEJk9qAqEj JPQrccHSq/58J18SY6LkTZAolvY0dTvGHLHmQxnbV7nvM/UB/LfDtvZBeAmRGgeWu5AE DUifQXEoKo/ZRbzsWXnzsLTu+2JEnVMPRmWfl3X5fxVN6PLGQKcChfJYjfPQLTASyLYF 0S9A== X-Forwarded-Encrypted: i=1; AJvYcCVSETKYD+FjkECPK+iWmu7rsVJiWNLbl1ei/nKlUb3If99vaSSHY8c2gbS0qMV68mZeQsiJ8AafErz9iaia@lists.postgresql.org X-Gm-Message-State: AOJu0Yw6T2U+R1UX777FKpiYlwbZWmchYEjW2u5IMNlj+DlU3ma2Joav yEjpsWJENAAjFf8mMwVqS8VObwr4SO7wOXeubvc21NfjLYLEx373wwIw X-Gm-Gg: ASbGnctVu7rmL7PI6CCXTBpeUYYvdOzhcpuf9/+b+kIvPXmm4gPY7pFPtf8SVrH7lkB m3U+h5sSIS7EZJvUNWKJkKH23BDmc3+8NtBLgQHUSiK9V6EvbRYokNNmgytJMiBl11ceo6H/Gx8 8F43R0dh8CZAuKTmJ7CrT3AC/sFdlwxPx4yVkis0Exn3ne1OppWq+ziSGX92IONy+BevLV7VlFW THIUQb8kSXORSpb4hExBRd3Mo7Fgg5hEAb1p2I2WgwmnLXbWNFZGs+Q9WxXxIeB+RJb/GnKGgJR uKlFHU0RSty/oQ8iDKzJ9H/P4Z6/VPMXKsTM6h9HCzuSl2TQEHSC/bLHgfxOc4J7RwEyoKgG1VP GYzp6oXp6buuifDMKsRkCofkKL0Wws24WGIvHUG80AQs= X-Google-Smtp-Source: AGHT+IGjf2KpcZFd+8SY2Jxj85dInZ63Ci6AaqU6amdJWaKLne12pZwM0ewj9pI1W33WVzwJjOCz2g== X-Received: by 2002:a05:6a00:1394:b0:771:ef79:9338 with SMTP id d2e1a72fcca58-7742def5d1emr7580886b3a.21.1757299103839; Sun, 07 Sep 2025 19:38:23 -0700 (PDT) Received: from smtpclient.apple ([142.171.105.12]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7722a4bcd09sm27329082b3a.49.2025.09.07.19.38.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Sep 2025 19:38:23 -0700 (PDT) From: Chao Li Message-Id: <80A10B63-DD7E-4057-A4EB-E2CA3CA1A796@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_92762432-8BE8-4653-85D9-4B70C8763904" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: Set log_lock_waits=on by default Date: Mon, 8 Sep 2025 10:38:07 +0800 In-Reply-To: Cc: Shinya Kato , Michael Banck , Tom Lane , Nathan Bossart , pgsql-hackers@lists.postgresql.org To: Laurenz Albe References: <659ffa38.170a0220.eea6a.28fc@mx.google.com> <65b146b9.170a0220.c645b.0891@mx.google.com> <20240206165343.GA3841415@nathanxps13> <524751.1707240550@sss.pgh.pa.us> <6698edb4.5d0a0220.df6fa.5b59@mx.google.com> <5dc4e037f60467da7bf7d17b10f6ec632a7c9095.camel@cybertec.at> X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_92762432-8BE8-4653-85D9-4B70C8763904 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 8, 2025, at 05:46, Laurenz Albe = wrote: >=20 > On Thu, 2025-09-04 at 14:12 +0900, Shinya Kato wrote: >> Due to 635998965 [0], you need to change guc_parameters.dat instead = of >> guc_tables.c. >=20 > Thanks for pointing that out to me! > Here is an updated patch. >=20 > Yours, > Laurenz Albe > I am hesitate to support this change. I agree log_lock_waits is a = powerful tool, but it=E2=80=99s more like a diagnostic tool. On a = high-concurrency system with many tractions running at the same time, it = may quickly fill up log files and make it difficult to find other = errors. So, we usually only turn it on when needed, and turn it off once = debugging is done. But v2 code looks good to me. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ --Apple-Mail=_92762432-8BE8-4653-85D9-4B70C8763904 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Sep 8, 2025, at 05:46, Laurenz Albe = <laurenz.albe@cybertec.at> wrote:

On Thu, 2025-09-04 at = 14:12 +0900, Shinya Kato wrote:
Due to = 635998965 [0], you need to change guc_parameters.dat instead = of
guc_tables.c.

Thanks for pointing that out to = me!
Here is an updated patch.

Yours,
Laurenz Albe
<v2-0001-Default-to-log= _lock_waits-on.patch>

I am hesitate to support this change. I agree log_lock_waits is = a powerful tool, but it=E2=80=99s more like a diagnostic tool. On a = high-concurrency system with many tractions running at the same time, it = may quickly fill up log files and make it difficult to find other = errors. So, we usually only turn it on when needed, and turn it off once = debugging is done.

But v2 code looks good to = me.

Best regards,
--
Chao Li (Evan)
HighGo Software = Co., Ltd.
https://www.highgo.com/




= --Apple-Mail=_92762432-8BE8-4653-85D9-4B70C8763904--