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 1sUOKq-002iAF-AT for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2024 10:26: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 1sUOKo-00DyA6-3K for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2024 10:26:02 +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 1sUOKn-00Dy9y-La for pgsql-hackers@lists.postgresql.org; Thu, 18 Jul 2024 10:26:02 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sUOKl-000BOY-90 for pgsql-hackers@lists.postgresql.org; Thu, 18 Jul 2024 10:26:01 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3685a5e7d3cso279339f8f.1 for ; Thu, 18 Jul 2024 03:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721298357; x=1721903157; 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=huJ9XqP18JLhSqOJU2Mi6bBzr0dOonMssT/yM55aY00=; b=D4FQHiVXzsrJHA17R1brwpzYFS0rQl5GJS4VW2tXiRtXYehBA6Njx7sQW331r0/fy2 yil72/4BRw+SU/2Ui0n8mo3GdRLpSfhBv82+JC5sBKHUSddret0q29PXvS+s/cVqJ7CW Lm2/B2spifvcXmnoZuIrWqwHx9aY2bHoAEHk7G196vzC5fxsrCQWGDHl9ZuAwCwQQ3tT 7CGj15GnMWuIDpnHO7hh11bsg0HVw2szplwFd0ihLkzy17LcLsTvYXQH96wFBXpThJHU BsZATNPanZXgyP12G3+1YpPOqcR0hfcATvuZikRFHEkz4jJs1EkVRVqiFi1MfFy8akpc fz5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721298357; x=1721903157; 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=huJ9XqP18JLhSqOJU2Mi6bBzr0dOonMssT/yM55aY00=; b=fXx40WxmJ1tLtaoAUPrafKu9JQFraQD+njJG3dBCyFQub0qsT8TGrINtFoTRnapdxP p802SgAwQqPyiQ+TJfsa6+XrVwWZN60ppsrJNKMEe2/agbdM34b1kW6GEBG6UqsVASqU 8sdvD0JeixE+id5MXKRiphaGzJiSUcwcZ41+fQg7j4hOxXm/YzcRmeEoYIrLxpm2IIs+ obp1nscrBfjE12ancjuGTYuqkqYLLjpT1Xln5nyOfu/SOnBWPl5FWCfM4KlTKLbjR0bg XnJgiPYlWZg8YVshmU+mOXnaN70QsA5VaZDF/psDY60p8J90JCyaRoQXkoc01xdTqWlx 5YvA== X-Forwarded-Encrypted: i=1; AJvYcCUd3HwoX/04k2WeTsQeG6v5wUc2miRp15rP07tI3329QjtUV6jYU9Axui/0A1uJ1UBtm0QTiBpBszP1S3iMV4oHJHkk8uQKIzFbgzWHquOxfAaf X-Gm-Message-State: AOJu0Yw2TvSW/QT/Fp4ZoxGHks4G2aI4XN9Gp4N6mC33KBTvCRsEovGc i8mAsFXbjzfoRbDyBDyy5CXAuxmcYJZ+FKgf/PSnRGPS9weaU2Pv X-Google-Smtp-Source: AGHT+IFWjdeFElQDTNv61Dqx8p5AMj6QNce1soEtndwc7yWLwUgFXKUFtbtmwmIPCxzUpzZLiqg7nw== X-Received: by 2002:adf:a311:0:b0:367:8875:dd4c with SMTP id ffacd0b85a97d-368315fb700mr3454902f8f.23.1721298357251; Thu, 18 Jul 2024 03:25:57 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:10be:3601:74c6:4afa:370:fd5c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dabf445sm14124918f8f.46.2024.07.18.03.25.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 03:25:56 -0700 (PDT) Message-ID: <6698edb4.5d0a0220.df6fa.5b59@mx.google.com> X-Google-Original-Message-ID: <20240718102555.GA21230@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 1sUOKh-0008Mf-Ps; Thu, 18 Jul 2024 12:25:55 +0200 Date: Thu, 18 Jul 2024 12:25:55 +0200 From: Michael Banck To: Tom Lane Cc: Nathan Bossart , Laurenz Albe , pgsql-hackers@lists.postgresql.org Subject: Re: Set log_lock_waits=on by default References: <659ffa38.170a0220.eea6a.28fc@mx.google.com> <65b146b9.170a0220.c645b.0891@mx.google.com> <20240206165343.GA3841415@nathanxps13> <524751.1707240550@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <524751.1707240550@sss.pgh.pa.us> 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 Hi, this patch is still on the table, though for v18 now. Nathan mentioned up-thread that he was hesitant to commit this without further discussion. Laurenz, Stephen and I are +1 on this, but when it comes to committers having chimed in only Tom did so far and was -1. Are there any others who have an opinion on this? On Tue, Feb 06, 2024 at 12:29:10PM -0500, Tom Lane wrote: > Nathan Bossart writes: > > It looks like there are two ideas: > > > * Separate log_lock_waits from deadlock_timeout. It looks like this idea > > has a decent amount of support, but I didn't see any patch for it so far. > > I think the support comes from people who have not actually looked at > the code. The reason they are not separate is that the same timeout > service routine does both things. To pull them apart, you would have > to (1) detangle that code and (2) incur the overhead of two timeout > events queued for every lock wait. It's not clear to me that it's > worth it. In some sense, deadlock_timeout is exactly the length of > time after which you want to get concerned. > > > IMHO this is arguably a prerequisite for setting log_lock_waits on by > > default, as we could then easily set it higher by default to help address > > concerns about introducing too much noise in the logs. > > Well, that's the question --- would it be sane to enable > log_lock_waits by default if we don't separate them? I think it would be, I have not seen people change the value of deadlock_timeout so far, and I think 1s is a reasonable long time for a default lock wait to be reported. > > * Set log_lock_waits on by default. The folks on this thread seem to > > support this idea, but given the lively discussion for enabling > > log_checkpoints by default [0], I'm hesitant to commit something like > > this without further community discussion. > > I was, and remain, of the opinion that that was a bad idea that > we'll eventually revert, just like we previously got rid of most > inessential log chatter in the default configuration. I somewhat agree here in the sense that log_checkpoints is really only useful for heavily-used servers, but this is a digression and due to the fact that log_checkpoints emits log lines periodically while log_lock_waits only emits them for application conflicts (and arguably application bugs), I do not think those would be in the "issential log chatter" group similar to how all SQL errors are not in that group either. Michael