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 1nNdSk-0001Ya-Ih for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 16:28:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nNdSj-0005vJ-Fh for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 16:28:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNdSj-0005tX-1a for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 16:28:57 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nNdSg-00065t-9k for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 16:28:56 +0000 Received: by mail-lf1-x12e.google.com with SMTP id g39so10285303lfv.10 for ; Fri, 25 Feb 2022 08:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oFVK9WQ4nAfloFuViR9Dri4/fjI6aUHywecDWearahU=; b=Z5UXwbG6DH4oxCywx8UBjuoIsSRuPZJxZSf8EFcy6iX+6Url2XwTBWmt1q27sIb1Vg PZCQJVtPpMS3wABrRBO1Xs/t/Pd2i3yIlIX0ACjDmZdpAYPr0UqaasggH4rL1XVLmQTT p5w7c/ACEbuRyNvnCEwuPfCyca7pYcj7kRCQY0an9q9WZyfbGqLD5VSij52zMK0uC3fp 29nN/xN/0iqcN3zaZ9Gn7gJWvkGX4Jp4yDJ082kBYNIeVVHEQbA3htXKZBqNLdS6h6CO wEm9WBzBQ3o7y7rppmqLT6GtYCJqMwZFkOklB1y+M76XzttFtXYm5l11pJdUhut1++9g fp5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oFVK9WQ4nAfloFuViR9Dri4/fjI6aUHywecDWearahU=; b=RCpcRdVtatGqPWLWE+6VOX6cRWymUUE7ZYnJzh76YUZXXcIkeXMxx78WEvB7IcvQFA HAbF57EF7tShFSViueYsqApkUngxveR6PQOtBOMAqk+IGD5PrilCGH07w4RCfHzoRHsr h+yFu6Wpr8E0zywUq2IlGDLjTXIFWu65h9WX37RIa9jtveoVS3lupG6F8WEFZTtItTuW Rwc/VrxOBmb4DoA5PW7AxX2ChCBN0Dj0YrZnYGdET7G30+JRluVVYLDiftL56dqXq6JS 9WOKZif8U+L4K+51TYA3a63v2tn4OzoB5dxnELjy6KOQhgMCnx1zGJcFEXh9/qOcfQ4Q nPgQ== X-Gm-Message-State: AOAM53081pHwFKO3Ad2hCerzLFNls5mm8YvSdZgt2f1kK+TJtzENVQNO OGsBpHltAODKRPSFklJKjhpLiZegVDsCbT9B2Nc3YskbH+I= X-Google-Smtp-Source: ABdhPJwX7K9Lc8WDL2EWNUA5TlSsxmD4MKui8B5+g3bHwbVIiSJKUc/sngv8kKsdwjBOz/MbPxfpD/l0hW2ekgT/US4= X-Received: by 2002:a05:6512:2094:b0:443:751a:493c with SMTP id t20-20020a056512209400b00443751a493cmr5764818lfr.374.1645806532953; Fri, 25 Feb 2022 08:28:52 -0800 (PST) MIME-Version: 1.0 References: <20220225162043.6gqavxs2evbe6htf@alap3.anarazel.de> In-Reply-To: <20220225162043.6gqavxs2evbe6htf@alap3.anarazel.de> From: Magnus Hagander Date: Fri, 25 Feb 2022 17:28:41 +0100 Message-ID: Subject: Re: Add parameter jit_warn_above_fraction To: Andres Freund Cc: PostgreSQL Developers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 25, 2022 at 5:20 PM Andres Freund wrote: > > Hi, > > 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 :) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/