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 1mVxh6-0003RH-Qz for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Sep 2021 15:09:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVxh5-0004QQ-2c for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Sep 2021 15:09:55 +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 <9erthalion6@gmail.com>) id 1mVxh4-0004QH-OF for pgsql-hackers@lists.postgresql.org; Thu, 30 Sep 2021 15:09:54 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1mVxgy-0005vd-6K for pgsql-hackers@postgresql.org; Thu, 30 Sep 2021 15:09:53 +0000 Received: by mail-wm1-x335.google.com with SMTP id r83-20020a1c4456000000b0030cfc00ca5fso8745066wma.2 for ; Thu, 30 Sep 2021 08:09:47 -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:content-transfer-encoding:in-reply-to; bh=1JTzUkTqUsnQGMFHCXuGtNF38ljmDlu8wPRwpC9gbi4=; b=JRK6OC7QJ1zQWIpQGDFO23vymcaCrWZxu/iU0ZVLYjChwTSFk5dgMjVl9N5P1DxG9m VVzL7NJLAe3YQopPTCcRYmOMg6snc2TqryqSofYLY5AaNhNurPgRfZxzdS/ymKoX7y1r P7l0Szhl147tr8wrauqr3bJWuI3FT+wiWB/DeUiilhqWw2awhfAYHrr4CzKAuKtwQYhX 82CjmohmBdhDGKbHrMkkuanPCHPScJ11HypsXhyFy3QW5ZK2PdvRxAdJT9PhjLQC02RU 6BjfiHrRTd1vnNlh/5a6tfUzIHK/oUZnOZfqpf2t8Sz5rIrMBxHirMG9P6ISsSkKIt3V Pn8Q== 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:content-transfer-encoding :in-reply-to; bh=1JTzUkTqUsnQGMFHCXuGtNF38ljmDlu8wPRwpC9gbi4=; b=N4+5W+B2Qo5Xo5E7LxbtcWnHz8Ykr+DLFvqzhON/3XKK9GC4xz9Wecg2gFQhMr+v2X 97oFUcVWT4BGmZmZbbKTpOvXbhYwPlBYm46RxDVKaP6cl/nKxZmr3wz2RHg+UaiOj3xz VTyBLRoXz3pscQA8V89OWwTyO7oBSqapuVP5Iwul9Cd4OWtGp0H7pJxUUGxNa5oPfNEf Ggn+qbVDkHESFF1pnfP289mKNsTZJq5PSptP1riXT3fTYweuhWTjnZvhT6Sl+jvWC6o6 ANtNOiCRd3DcSPsfpWpnqXXBrsbRzsbavkkIXF+1Amwa0aMYn8rGFm2vpss8O5t4cNwo 5scQ== X-Gm-Message-State: AOAM532dnGuwErHF/fXi6oqy2d57GzJDqyPiEO19bLvTG60c4C38Z92Y JxiFRkaVA+RhdlYBaeTL5C0= X-Google-Smtp-Source: ABdhPJzyphmeMqKfQObN5p3WCuBCqCGsJagRjUyFm0FKlFy9jXvDUXIxd+UfeMLQS43Z55gxnMTGAQ== X-Received: by 2002:a1c:f00a:: with SMTP id a10mr5852004wmb.112.1633014585678; Thu, 30 Sep 2021 08:09:45 -0700 (PDT) Received: from localhost (dslb-094-222-009-006.094.222.pools.vodafone-ip.de. [94.222.9.6]) by smtp.gmail.com with ESMTPSA id b130sm5572185wmd.44.2021.09.30.08.09.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Sep 2021 08:09:45 -0700 (PDT) Date: Thu, 30 Sep 2021 17:09:57 +0200 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Zhihong Yu Cc: David Steele , PostgreSQL-development , Tom Lane , Greg Stark , Pavel Trukhanov Subject: Re: pg_stat_statements and "IN" conditions Message-ID: <20210930150957.tz3h3unjyrzatw6e@localhost> References: <20201226104635.uvzkftzu72zg5qux@localhost> <20210105125230.etgmgixnn6fmpszl@localhost> <20210318155002.ggrgf2p2mvaodcox@localhost> <20210615151850.6nsue7z5xjhpytle@localhost> <20210616140212.kt3n5wi3alfz5i5d@localhost> <20210930134930.d4vzwhvxhfpk2zxt@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Thu, Sep 30, 2021 at 08:03:16AM -0700, Zhihong Yu wrote: > On Thu, Sep 30, 2021 at 6:49 AM Dmitry Dolgov <9erthalion6@gmail.com> wrote: > > > >On Wed, Jun 16, 2021 at 04:02:12PM +0200, Dmitry Dolgov wrote: > > > > > > > I've prepared a new rebased version to deal with the new way of > > > > computing query id, but as always there is one tricky part. From what I > > > > understand, now an external module can provide custom implementation > > for > > > > query id computation algorithm. It seems natural to think this > > machinery > > > > could be used instead of patch in the thread, i.e. one could create a > > > > custom logic that will enable constants collapsing as needed, so that > > > > same queries with different number of constants in an array will be > > > > hashed into the same record. > > > > > > > > But there is a limitation in how such queries will be normalized > > > > afterwards — to reduce level of surprise it's necessary to display the > > > > fact that a certain query in fact had more constants that are showed in > > > > pgss record. Ideally LocationLen needs to carry some bits of > > information > > > > on what exactly could be skipped, and generate_normalized_query needs > > to > > > > understand that, both are not reachable for an external module with > > > > custom query id logic (without replicating significant part of the > > > > existing code). Hence, a new version of the patch. > > > > > > Forgot to mention a couple of people who already reviewed the patch. > > > > And now for something completely different, here is a new patch version. > > It contains a small fix for one problem we've found during testing (one > > path code was incorrectly assuming find_const_walker results). > > > Hi, > > bq. and at position further that specified threshold. > > that specified threshold -> than specified threshold You mean in the patch commit message, nowhere else, right? Yep, my spell checker didn't catch that, thanks for noticing!