pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Michael Banck <mbanck@gmx.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Set log_lock_waits=on by default
Date: Fri, 19 Jul 2024 16:22:29 +0200
Message-ID: <Zpp2pYnZ5fYvtymC@msg.df7cb.de> (raw)
In-Reply-To: <CA+TgmoYTOQk8M7Zpg2p8xuSK6SiRQD7mC_5SH9y5qVghqB4tWg@mail.gmail.com>
References: <b8b8502915e50f44deb111bc0b43a99e2733e117.camel@cybertec.at>
	<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>
	<ZpppCLK1gNs7aXQS@msg.df7cb.de>
	<CA+TgmoYTOQk8M7Zpg2p8xuSK6SiRQD7mC_5SH9y5qVghqB4tWg@mail.gmail.com>

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





view thread (33+ messages)  latest in thread

Message-ID: <Zpp2pYnZ5fYvtymC@msg.df7cb.de>
Permalink:  ../Zpp2pYnZ5fYvtymC@msg.df7cb.de/
Also on:    postgresql.org/message-id/Zpp2pYnZ5fYvtymC@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: myon@debian.org, robertmhaas@gmail.com, laurenz.albe@cybertec.at, mbanck@gmx.net, tgl@sss.pgh.pa.us, nathandbossart@gmail.com
  Subject: Re: Set log_lock_waits=on by default
  In-Reply-To: <Zpp2pYnZ5fYvtymC@msg.df7cb.de>
  References: <b8b8502915e50f44deb111bc0b43a99e2733e117.camel@cybertec.at> <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> <ZpppCLK1gNs7aXQS@msg.df7cb.de> <CA+TgmoYTOQk8M7Zpg2p8xuSK6SiRQD7mC_5SH9y5qVghqB4tWg@mail.gmail.com> <Zpp2pYnZ5fYvtymC@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox