Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNdke-0002NV-Fk for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 16:47:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nNdkd-0006cY-6o for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 16:47:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNdkc-0006cP-U1 for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 16:47:26 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNdka-0004VW-GX for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 16:47:25 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E51D45C0184; Fri, 25 Feb 2022 11:47:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 25 Feb 2022 11:47:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=ohP2UiAHicbXa1RO4IQeBwukMEU7w8nEjRE7m3 dWtmc=; b=fiI44WUuf20bS1YWrOcsBLfK8QAB8fK4sGXLshEVV1bReBqVew7fmJ pXc0BdtPdhEd3NUPCyB37T+v878MeA0o3naHBtAANCkPcDzVsKdixET4bT+65bAz tJevNj45VtF+9dBqS5av2vUa+EyN1u4i+Zi8zIkD91YLKofX37W1+iQXa3GcSTYH b8QrWbA16wdKMxQs5CMBDGD1UEco9Nph7nP9u8mHlnKVBDxr9XMQkDfjkWxo3wFn L8i2dL62rCSU63bCoRkFvstRwbGzBg2J0Eh56TT0NfE7tiGUcJCEjNxdsiCEdEsw TJt9u3aor8TWdCH+lRn2eubXeRXPPWNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ohP2UiAHicbXa1RO4 IQeBwukMEU7w8nEjRE7m3dWtmc=; b=lsV68eiGR3A6KPlN0yZbNWQNvAqLm//9O fFc0LHww2ALLJ89K+bb1I3eMpRTWSJLw732Py2PjtI8PL7ATOc8UG0SJ1miSVQ05 KCrgzdk+HKDUjMf5FfxhsYOa6HXDV8nIJFK7ZpL95XO1luL32c31MdHbMFIEgXKS MrB/DwPOqDrh2iBCv7WmhlNReGSSAtJ838S4Sq1ni+Nx4zzoutcTPBNLlPeLCAJv 1lgxTkjdcgUrar4TNSwZ6VKYoQOcS2HV16X0nCGwVTNl4o7UuoYwT2I3yIUjNsC+ Ga6DPO4ITFnuXJxCqaKMqNNZjnYpkt87iSv2jyEaFKtpjFsLDNtRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleeggdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Feb 2022 11:47:23 -0500 (EST) Date: Fri, 25 Feb 2022 08:47:22 -0800 From: Andres Freund To: Magnus Hagander Cc: PostgreSQL Developers Subject: Re: Add parameter jit_warn_above_fraction Message-ID: <20220225164722.n34hw5khyztjgnv3@alap3.anarazel.de> References: <20220225162043.6gqavxs2evbe6htf@alap3.anarazel.de> 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 Hi, On 2022-02-25 17:28:41 +0100, Magnus Hagander wrote: > On Fri, Feb 25, 2022 at 5:20 PM Andres Freund wrote: > > On 2022-02-25 16:16:01 +0100, Magnus Hagander wrote: > > > This patch adds a configuration parameter jit_warn_above_fraction that > > > will cause a warning to be logged if the fraction of time spent on > > > doing JIT is bigger than the specified one. For example, this can be > > > used to track down those cases where JIT ends up taking 90% of the > > > query runtime because of bad estimates... > > > > Hm. Could it make sense to do this as a auto_explain feature? > > It could be. But I was looking for something a lot more "light weight" > than having to install an extension. But yes, if we wanted to, we > could certainly change jit_warn_above_fraction to be > auto_explain.log_min_jit_fraction or something like that, and do > basically the same thing. But then, we could also have > log_min_duration_statement be part of auto_explain instead, so it's > all about where to draw the line :) I guess it feels a tad on the "too narrow/specific" side of things for the general code. We don't have log_min_duration_{parsing,planning,execution} either. But I also get it. So I just wanted to raise it ;) Greetings, Andres Freund