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 1qdGsx-002nA1-VG for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Sep 2023 21:13:27 +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 1qdGsw-00EWM9-LK for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Sep 2023 21:13:26 +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 1qdGsw-00EWLm-AC for pgsql-hackers@lists.postgresql.org; Mon, 04 Sep 2023 21:13:26 +0000 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qdGss-0033vl-S0 for pgsql-hackers@lists.postgresql.org; Mon, 04 Sep 2023 21:13:25 +0000 Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-d7eed15ad69so1539897276.1 for ; Mon, 04 Sep 2023 14:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1693862001; x=1694466801; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=L3Zvx+07nuHV/6X2g7sNR6cRNoJDRZf5xGI97qGVUMM=; b=HM0oP5msV6wjAZV1QkVIfntDhqqGUfNRvMTAK+njEZzDqitluYcQTVAxRv+wfsKofm SbytDxZiH4FidrOxBG1aTn2aUrrblPvjCTrFYTgbI/E8QgHdeqCO9jJfBNtWt4GLuzKa EO6y/lw5uXALNu48OqfqBnfoxCz29rLLQVQKg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693862001; x=1694466801; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L3Zvx+07nuHV/6X2g7sNR6cRNoJDRZf5xGI97qGVUMM=; b=Y9aE2GdaT8Uf/hFL9D/Mv32HiT01cp9j3ZOAHWTHorqo3JgeuskG6GkXJQxnAqi+wv 4PvLgNokmN+ndpq6pvNrEM2XUzQBQf12i1kkcxh8d4lPXZVC30cRsNAVy11U3yuFwl6C ejkfofhtlTnHPKqcRPLxAoMBt+RU/6B8RGzdg6/A0v2fqsix09knK6IH1gxH+WRmyRIP HAMmqDF04PGYJOoPeojt/PNr52Ej3QuCcgguoyqu+JZjICVZB7/ERA/wZ+6y8jzTqCoK OUP6YWl4/seUOFlMZUuA91piurvZ75HlrM6amXlH7TbTYl1sv5mL/aclsR6AKb/R/grb 3u8g== X-Gm-Message-State: AOJu0YyKjdwKyfkuxlehH8oGyJLTIrs+AYoMOmzSqI1o1bg/JzaYo43P MV/KB3Q03dEajLvTVO+exy4vvg== X-Google-Smtp-Source: AGHT+IGBYwvDgNI8M/MEqH1fhV5vsU58KsYavoMABJvbpNgTSuT6bgFuVF2Dt306gzJKDSKz0whcGg== X-Received: by 2002:a25:6d89:0:b0:d10:e6a2:1947 with SMTP id i131-20020a256d89000000b00d10e6a21947mr10874033ybc.19.1693862001166; Mon, 04 Sep 2023 14:13:21 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id b9-20020a252e49000000b00d746487d6f7sm2386670ybn.35.2023.09.04.14.13.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Sep 2023 14:13:20 -0700 (PDT) Date: Mon, 4 Sep 2023 14:13:18 -0700 From: Noah Misch To: Ilya Gladyshev Cc: pgsql-hackers@lists.postgresql.org Subject: Re: backtrace_functions emits trace for any elog Message-ID: <20230904211318.GB3789310@rfd.leadboat.com> References: <16FA9698-7A7A-4312-BD34-4E2671007B76@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16FA9698-7A7A-4312-BD34-4E2671007B76@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Sep 04, 2023 at 09:30:32PM +0100, Ilya Gladyshev wrote: > I used backtrace_functions to debug one of my ideas and found its behavior counter-intuitive and contradictory to it own docs. I think the GUC is supposed to be used to dump backtrace only on elog(ERROR) (should it also be done for higher levels? not sure about this), but, in fact, it does that for any log-level. I have attached a patch that checks log-level before attaching backtrace. This would make the feature much less useful. Better to change the docs.