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 1rNvzT-00HDT2-Mh for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jan 2024 14:25:04 +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 1rNvzS-00C89z-Hp for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jan 2024 14:25: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 1rNvzS-00C89n-5K for pgsql-hackers@lists.postgresql.org; Thu, 11 Jan 2024 14:25:02 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rNvzP-0011EQ-Hj for pgsql-hackers@lists.postgresql.org; Thu, 11 Jan 2024 14:25:00 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a26f73732c5so634695066b.3 for ; Thu, 11 Jan 2024 06:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704983097; x=1705587897; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ezLz4WUPBuNtYAhpUfTjBImzLGWvjb5r4suk79Z4Vok=; b=LNZRxmAchciH8plXDt+XS7P8GBdiP8Sx5N3wdYACJ7uVoeEkEVOj8EE8ws79YILYoV Ems0YMU5/uartyIfef2zrZjfI49huLM52vYRyFZX4YehZmhk2oFE+/o1izNC/u8n3Nii GHnHIC3rUZAR4Ykq4fQr88UwhBaX/JupHZ3e//Yolqa5lSmxmuveLNvNb56eFdSBG4qw av7FRRZ6pzA6LB9OKdwA5zc4CbrCpGwEHCAAGgKI1r5zB+yCZSoeT/jYmbjQjuXzicLb NTfXD/pmMWw/bhEmvHqoqWlfB7eJVJP4GUKmXJ7QiCUtPTJNW2KHJThWbBptOXAIWo0y 6x5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704983097; x=1705587897; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ezLz4WUPBuNtYAhpUfTjBImzLGWvjb5r4suk79Z4Vok=; b=qN2hELpmW0ju7nP0h4c9i9/5FEiwZCsLQrPzvnirv1SuT6G0o3f/N8LPWGwCUA3FFW oLjG3L3xkI/G/2aQPl/pKtucw3ivGwoJeZcTtqTHgWumR7C3lG3o3bAkNradQEcK6W4B cmXl7h3zKgG3NigY/OL005AD0QWXhJCf54QR7OTSiPpBEWTUq6tKVkzSfoFe964c2TFT epD6z3pWxrBb6/qb7Q/Z+NJ1Lh1DyFBmf5bec9ucssGNlUOYif+v7Y/inBEQQORhs/YO BSBz/zb9BfQD6RESQjpcYMhGBkY4O3ePbe9yRVF/GNFr8xhV8AAofKlAP8dblYgEHM+6 8PvA== X-Gm-Message-State: AOJu0YytQ0zr8QUUneyf0CznDrLE/eV5agb5NATIs3kowaBBm+LiUte+ SGgdYLcl+1MhU6czUCQboESAwilePq2BPw== X-Google-Smtp-Source: AGHT+IHQ+dpX/uD3PTp4GZ2zYW6iQgcKpejiIyV1R+n/vYQttjocBrR9Z+Bqbu5FiiJxJ22mb/AWxw== X-Received: by 2002:a17:906:3542:b0:a29:40fe:254d with SMTP id s2-20020a170906354200b00a2940fe254dmr593541eja.69.1704983096991; Thu, 11 Jan 2024 06:24:56 -0800 (PST) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:10cd:8701:ed11:b7eb:8de7:fbd6]) by smtp.gmail.com with ESMTPSA id g16-20020a17090670d000b00a28f51adc39sm634090ejk.61.2024.01.11.06.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 06:24:56 -0800 (PST) Message-ID: <659ffa38.170a0220.eea6a.28fc@mx.google.com> X-Google-Original-Message-ID: <20240111142455.GC3613@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1rNvzL-00084u-VJ; Thu, 11 Jan 2024 15:24:55 +0100 Date: Thu, 11 Jan 2024 15:24:55 +0100 From: Michael Banck To: Laurenz Albe Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Set log_lock_waits=on by default References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mvpLiMfbWzRoNl4x" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Thu, Dec 21, 2023 at 02:29:05PM +0100, Laurenz Albe wrote: > Here is a patch to implement this. > Being stuck behind a lock for more than a second is almost > always a problem, so it is reasonable to turn this on by default. I also think that this should be set to on. I had a look at the patch and it works fine. Regarding the documentation, maybe the back-reference at deadlock_timeout could be made a bit more explicit then as well, as in the attached patch, but this is mostly bikeshedding. Michael --mvpLiMfbWzRoNl4x Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="log-lock-waits-doc.patch" diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 6d975ef7ab..7f9bdea50b 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -10185,11 +10185,12 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' - When is set, - this parameter also determines the amount of time to wait before - a log message is issued about the lock wait. If you are trying - to investigate locking delays you might want to set a shorter than - normal deadlock_timeout. + When is set to + on (which is the default), this parameter also + determines the amount of time to wait before a log message is issued + about the lock wait. If you are trying to investigate locking delays + you might want to set a shorter than normal + deadlock_timeout. --mvpLiMfbWzRoNl4x--