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 1sUoVF-005qwd-VV for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jul 2024 14:22:33 +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 1sUoVE-00Ha8l-0Y for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jul 2024 14:22:32 +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 1sUoVD-00Ha8d-Nd for pgsql-hackers@lists.postgresql.org; Fri, 19 Jul 2024 14:22:32 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sUoVB-000OPg-Ua for pgsql-hackers@lists.postgresql.org; Fri, 19 Jul 2024 14:22:31 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1480:91e0:e5dd:5ff4:a196:e226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4WQX1x2tFWz3F4W; Fri, 19 Jul 2024 16:22:29 +0200 (CEST) Date: Fri, 19 Jul 2024 16:22:29 +0200 From: Christoph Berg To: Robert Haas Cc: Laurenz Albe , Michael Banck , Tom Lane , Nathan Bossart , pgsql-hackers@lists.postgresql.org Subject: Re: Set log_lock_waits=on by default Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Robert Haas > I've definitely seen systems where this setting would have generated > regular output, because I see a lot of systems that are chronically > overloaded. I'd argue this is exactly what I mean by "this system has a problem". Telling the user about that makes sense. > cautious about this than most people on this thread: log_checkpoints > won't generate more than a few lines of output per checkpoint > interval, and a checkpoint cycle will be on the order of minutes, so > it's really never that much volume. On the other hand, in theory, this > setting can generate arbitrarily many messages. Well, it's still limited by 1 message per second (times max_connections). It won't suddenly fill up the server with 1000 messages per second. The log volume is the lesser of the problems. Not printing the message just because the system does have a problem isn't the right fix. > Finding the messages that indicate real database problems is typically > quite difficult, even if they're all enabled. If they're disabled by > default, well then the useless crap is the ONLY thing you find in the > log file, and when the customer has a problem, the first thing you > have to do is tell them to turn on all the GUCs that log the actually > important stuff and wait until the problem recurs. > > I have yet to run into a customer who was thrilled about receiving that message. Let's fix the default. People who have a problem can still disable it, but then everyone else gets the useful messages in the first iteration. Christoph