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 1tprnr-00DSMj-Gb for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Mar 2025 16:41:03 +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 1tprnq-00GB7e-5H for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Mar 2025 16:41: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 1tprnp-00GB7V-M6 for pgsql-hackers@lists.postgresql.org; Wed, 05 Mar 2025 16:41:01 +0000 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tprnl-0018Pi-3B for pgsql-hackers@lists.postgresql.org; Wed, 05 Mar 2025 16:41:01 +0000 Received: by mail-qk1-x72a.google.com with SMTP id af79cd13be357-7c3c91060d0so373009885a.0 for ; Wed, 05 Mar 2025 08:40:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1741192857; x=1741797657; darn=lists.postgresql.org; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=U75fra6qpAu6nlVAO2nTZ5rpRYAhNaq9oxEE0VnTRXs=; b=m0X+b0gXtwfPe4cZmT6pdnlyJe9FwAIpOfDW+4otksAUrBYvuEuC4UhqI4HGxuQD9c ZSJ2c595PO8Hm3TUQVDLytiRMInrY2+T2A4tP+2oVTf0bTGNJX/RN9pyW8I03phJ36FW h9MhHSWaHa+tUC5goaJCTuulu8vBLczkLWXetVwzb2kbpI2cnnqmyOwMlsNpXogf9TOT +s8hcIdT87trX8RlRjgw191q3tCWW3q/1jkNNLIA400CUlTEiJ9aA5Q9AWOZQPT0NWG7 PwY4PvfCVntuI5jqaknyO9xnuHtEOmQCkYPA3Um32Y9bw9ZnsWPJ/pGBNC75K5ujsmti fKnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741192857; x=1741797657; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U75fra6qpAu6nlVAO2nTZ5rpRYAhNaq9oxEE0VnTRXs=; b=vq8N6kv07KOj4bmSIjYI4msDQk/RFSzeFM44gdS3vTqCWUYBNMeefEduvwtf1VSYGP cTQhvX488DtQdWxkTkxQP+LLlhWrY5Vi+X92aLFXF+djrGvoCBh6Tbu+wtwPnYHoUKyX vdEhNP2oIX9Vf13Vfm6o1yVOJog4Tsbf0O3YVtKmwUrBavksKWUTyPWeOtI1koNWOeJ+ 5ExwKhd7pqgi2qjH2IlE9bv41c5sJe5HCP6+AnNZJIzENu0dphGViBn6GQSamTRIuJdb Q1n1YvtwnWfWuhGuHa4B+p0qAkm3pBuTuuQKIcc4Sl4X+O+Gy2MVNpqnxKzbpw28Bedd RaCQ== X-Gm-Message-State: AOJu0YxOlllh/KIXftfVB0aPYCzhBstCLPeupydWa51oLNnm4oSaqJ1A mm1Vwg1IwMu5v64RcYoOS45WKoij2vGADJzFL+Bcv8b2z2qfVHElh5apjM+Zb4c= X-Gm-Gg: ASbGnct3HVsmYMZj+ClhDwKsIcoCWCzOPYJ4zZ8x2hqwEA1vYpRUDS2gg/EgQvz1q0l IfgsK3GAjKmpUyG5o/cF57GF86Ozxh1oUXlQ4ETQFz/KUad75WWQYhDXeeQ6Qe3KeG2p9rTd1tB QCgwBaqJhjs+fvrwtod6bS+J57oVA2djtmttUOYyCi6mGjQON2DKxVu60QKyQEgO+dhu6ZHDz71 JrlyZkv4Grsn2Fq2xQ76b6LHEbj0NGGWP1inQqcGG1mQT+IWJyBxQhp12V8t2KHmAT7JOultoq0 WRoG6JDimFepfrNL1J/UiJ3zHNTVa/9gbZOi2s0Ur6LUcfXeVFHza/U= X-Google-Smtp-Source: AGHT+IGRLThXzqq5chdcEw5u+VTHuDOzitXnkCqV+NSN6nYpDmavP8+ZrH522ltU+N0ajoRHkb2d0g== X-Received: by 2002:a05:620a:8392:b0:7c3:cfec:39d5 with SMTP id af79cd13be357-7c3d8e2511dmr637260185a.4.1741192856871; Wed, 05 Mar 2025 08:40:56 -0800 (PST) Received: from ?IPV6:2605:a601:a681:6b00::1cb? ([2605:a601:a681:6b00::1cb]) by smtp.googlemail.com with ESMTPSA id af79cd13be357-7c378d9f917sm899986985a.78.2025.03.05.08.40.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Mar 2025 08:40:56 -0800 (PST) Content-Type: multipart/alternative; boundary="------------10E6xtzNZ3UfMtNR0g0qpA1Z" Message-ID: <001f81e3-2be8-46ad-9aee-1a761686712c@dunslane.net> Date: Wed, 5 Mar 2025 11:40:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: log_min_messages per backend type To: Euler Taveira , Alvaro Herrera Cc: pgsql-hackers@lists.postgresql.org References: <202502051851.2nvzh3a6ukzc@alvherre.pgsql> <313aa202-b5fa-4e3f-95d0-83425575c66d@app.fastmail.com> From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andrew@dunslane.net; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6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76kKmUbZxABEBAAHCwHwEGAEIACYCGwwWIQTkPlhGHfx8v0RpFaWZ+n/LWfw7gQUCZFlx 5wUJGVGAjgAKCRCZ+n/LWfw7gf+iB/4g8CPY5jihf5r/8EsoIGe2H+dpVmpPF8YGBzTIvCz/ fQoOq8AX/pE76QEuFnFZWfjw+wgBXgCVmkox2Eflkk6z4ND3pcwGZ6CfCxTQCDk/dij+2DQ4 6bmDCy/sBgcbz9mTpoLC11HLoPae6YN9nBNQRZDcEFEu54OaVOqlIdbA6m+POIBCXZdHOFc0 WoDTgxHRzC1jgQNidyd6tKqcsVJs0dzF0oKTmFFmUAqTdJO12LBuNA1rlqrR3EtpYk8B/wtS 5dIMD7Q8hwQpL+4C6GNpb6ZKnPkLi47pDOLhz2qBrqN+rqUEsT3YnExYpzj5yOBi+FlmV1Hw 49QYe1sn2ZPs In-Reply-To: <313aa202-b5fa-4e3f-95d0-83425575c66d@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------10E6xtzNZ3UfMtNR0g0qpA1Z Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2025-03-04 Tu 7:33 PM, Euler Taveira wrote: >> I think it should be acceptable to configure one global setting with >> exceptions for particular backend types: >> >> log_min_messages = WARNING, autovacuum:DEBUG1 >> >> Right now I think the code only accepts the unadorned log level if there >> are no other items in the list.  I think the proposal downthread is to >> use the keyword ALL for this, >> >>   log_min_messages = all:WARNING, autovacuum:DEBUG1   # I don't like this >> >> but I think it's inferior, because then "all" is not really "all", and I >> think it would be different if I had said >> >>   log_min_messages = autovacuum:DEBUG1, all:WARNING   # I don't like this >> >> because it looks like the "all" entry should override the one I set for >> autovacuum before, which frankly would not make sense to me. > > Good point. After reflection, I agree that "all" is not a good keyword. > This patch turns backend type as optional so WARNING means apply this > log level as a final step to the backend types that are not specified in > the list. > >> So I think these two lines, >> >> log_min_messages = WARNING, autovacuum:DEBUG1 >> log_min_messages = autovacuum:DEBUG1, WARNING >> >> should behave identically and mean "set the level for autovacuum to >> DEBUG1, and to any other backend type to WARNING. > > Done. Just bikeshedding a bit ... I'm not mad keen on this design. I think the value should be either a single setting like "WARNING" or a set of type:setting pairs. I agree that "all" is a bad name, but I think "default" would make sense. I can live with it but I think this just looks a bit odd. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------10E6xtzNZ3UfMtNR0g0qpA1Z Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2025-03-04 Tu 7:33 PM, Euler Taveira wrote:
I think it should be acceptable to configure one global setting with
exceptions for particular backend types:

log_min_messages = WARNING, autovacuum:DEBUG1

Right now I think the code only accepts the unadorned log level if there
are no other items in the list.  I think the proposal downthread is to
use the keyword ALL for this,

  log_min_messages = all:WARNING, autovacuum:DEBUG1   # I don't like this

but I think it's inferior, because then "all" is not really "all", and I
think it would be different if I had said

  log_min_messages = autovacuum:DEBUG1, all:WARNING   # I don't like this

because it looks like the "all" entry should override the one I set for
autovacuum before, which frankly would not make sense to me.

Good point. After reflection, I agree that "all" is not a good keyword.
This patch turns backend type as optional so WARNING means apply this
log level as a final step to the backend types that are not specified in
the list.

So I think these two lines,

log_min_messages = WARNING, autovacuum:DEBUG1
log_min_messages = autovacuum:DEBUG1, WARNING

should behave identically and mean "set the level for autovacuum to
DEBUG1, and to any other backend type to WARNING.

Done.


Just bikeshedding a bit ...

I'm not mad keen on this design. I think the value should be either a single setting like "WARNING" or a set of type:setting pairs. I agree that "all" is a bad name, but I think "default" would make sense.

I can live with it but I think this just looks a bit odd.


cheers


andrew



--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------10E6xtzNZ3UfMtNR0g0qpA1Z--