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 1nd2bU-0003Ra-6p for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Apr 2022 04:21:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nd2bR-0003wC-W2 for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Apr 2022 04:21:37 +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 1nd2bR-0003w1-LI for pgsql-hackers@lists.postgresql.org; Sat, 09 Apr 2022 04:21:37 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nd2bP-0007Nx-E7 for pgsql-hackers@lists.postgresql.org; Sat, 09 Apr 2022 04:21:37 +0000 Received: by mail-pl1-x62b.google.com with SMTP id s11so9566563pla.8 for ; Fri, 08 Apr 2022 21:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=j82Uk6fM+9EdFDZOi6AK0Tjid7st0R4QHgPCuvi//rg=; b=pYicejPlG34QhChvXzYXJ/2RV2K+Kj3vtunzdZ86drml3/qJwBO7bC2ClUsxT7wn7H l+MtPb8LoZj7DUpGWKzpPSsngnFHB9HgeWubHb6GE4myxrUbdHaNNZy1REit8NvrTVIR hFZ5eSmuUcDLHjbF2LpvYYNXfvTYpazqnBLo/bvthWh57e8G6tIr/sfxDcNJN6ibRFMC jg1/LAPgInFUwOSdgPBDhqTkXF1qBiu0g4q50xGg7khvv2Kj9hXZt7DyvM1BI1a0C7aN GD1kACpkF8P6REEsPHp0+c7nsniALNBFJbYE28m2fkNBl+ZjZfDNqyerFqWRz6Tjzddg bXyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=j82Uk6fM+9EdFDZOi6AK0Tjid7st0R4QHgPCuvi//rg=; b=uB6BB7c7chSonsGEQ40os+C6nqelWatJrQDI11izMv5XQpxF8K6TBQP7URuB9Qz9g2 NSnPLbnAsKFIp5b15uVdRXT2S/d8LNHW9v7TFKCtOrHzig8UKDljs/LMVzAa9CeYby0A q9+hT73XwripjqUiyk97mUNP+Fz2bIIPyFB6Unf1XK5rt8rSiy51JoPr0ffqmh89Zrdv TPDPj+3mjlrxbt7tkNjJA8ljbyq16Jsb+kuq3ODT/VMgg9eX4QOLxiTQTraMQJTHcaZw WVcF0qhtisjmA/ovGyFCqzgosBO22affoDd2HkKVEC3igpqvsT8bW9uzM6QYlOQAQc/G ofpA== X-Gm-Message-State: AOAM531iBfgu4j4/486hWCPufrrAH7aRyPzDLD1FU7VMSD+M2j68pXUJ FBsxzOx04Zm0o2IWYNEAwTg= X-Google-Smtp-Source: ABdhPJz2srnV1QrORZq7kALoes9p/+kOnhneRRIR88tb2ur3eSGvABTP/uURvPkf3PcB54UCXsluhw== X-Received: by 2002:a17:902:8c81:b0:156:7fee:643b with SMTP id t1-20020a1709028c8100b001567fee643bmr22415148plo.59.1649478092191; Fri, 08 Apr 2022 21:21:32 -0700 (PDT) Received: from jrouhaud (1-171-175-224.dynamic-ip.hinet.net. [1.171.175.224]) by smtp.gmail.com with ESMTPSA id p10-20020a17090a680a00b001c7bf7d32f9sm13589810pjj.55.2022.04.08.21.21.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 21:21:31 -0700 (PDT) Date: Sat, 9 Apr 2022 12:20:57 +0800 From: Julien Rouhaud To: Stephen Frost Cc: Magnus Hagander , David Rowley , Robert Haas , Andres Freund , Justin Pryzby , PostgreSQL Hackers Subject: Re: Add parameter jit_warn_above_fraction Message-ID: References: <20220321235048.wb3ymun6lbi33b2u@alap3.anarazel.de> <20220329100846.3iedk5ear3ewdi5j@jrouhaud> <20220408133918.GE10577@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220408133918.GE10577@tamriel.snowman.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Fri, Apr 08, 2022 at 09:39:18AM -0400, Stephen Frost wrote: > > * Magnus Hagander (magnus@hagander.net) wrote: > > The addition to pg_stat_statements I pushed a short while ago would help > > with that. But I think having a warning like this would also be useful. As > > a stop-gap measure, yes, but we really don't know when we will have an > > improved costing model for it. I hope you're right and that we can have it > > by 16, and then I will definitely advocate for removing the warning again > > if it works. > > Having this in pg_stat_statements is certainly helpful but having a > warning also is. I don't think we have to address this in only one way. > A lot faster to flip this guc and then look in the logs on a busy system > than to install pg_stat_statements, restart the cluster once you get > permission to do so, and then query it. +1, especially if you otherwise don't really need or want to have pg_stat_statements enabled, as it's far from being free. Sure you could enable it by default with pg_stat_statements.track = none, but that seems a lot more troublesome than just dynamically enabling a GUC, possibly for a short time and/or for a specific database/role.