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 1lHz6B-0000pE-4R for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Mar 2021 01:17:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHz6A-0008Ot-1c for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Mar 2021 01:17:46 +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 1lHz69-0008Om-KQ for pgsql-hackers@lists.postgresql.org; Fri, 05 Mar 2021 01:17:45 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lHz66-000361-6q for pgsql-hackers@postgresql.org; Fri, 05 Mar 2021 01:17:45 +0000 Received: by mail-ej1-x632.google.com with SMTP id ci14so304119ejc.7 for ; Thu, 04 Mar 2021 17:17:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Ddtg8GcLWZfaeLGzSyjrhAyk17Ih9KhlqANbfZChfTg=; b=NhfpLqGC6gJitNyZNado7p2502fNX4q+cL84nnDXuTGVbRyfvOXVAGo/dD8vdGV0vI 3VqkSSPkPU7Wjfj+FI3WmNgQFAC5LCenMWUGiErcKWBgRedjSOHTfeGtC/PwTWE3sVVu pJqS1O6E4ZG/QMfeHh/RogZQU+Ko0LsKjByINkXdNoOfkj+ZOiUwIfiAvAoGBK2qMJUC GJZV/VVI1v2ClmrF8HgPeTllD0Spjuc4lkh893cnd6xpPBC9WWSOP3uKiHpESSshFPKM zuCxwu8nPSLecEYkgQs6ndBkVSI6zTVE7abhmq2+1ycvC1qv83COIDkVcjHdX+wgxzz8 Qx8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ddtg8GcLWZfaeLGzSyjrhAyk17Ih9KhlqANbfZChfTg=; b=OQlA+TYoDYMh9YFjIzRlUL/iIXzsmkWlhlxfUB2Re5x+Vc/5u+76UpoZA7te9+2yns Tx5tlPHZALnyvn2y3w3WXgy2IsFwMKi9Y7nB+eS9ZYy0NsoAIFzECBow4JPSS/xCwVWj zLNhQTK8j7MG6lojYjF+d4vX1Uk5LZBZJOn/H5m2U+5aL7z0YYIrTz58+CwwpQPEYOXm 2z41oGRi3XtDNAARgUjTzdTpZzbfMhDY2MZ5fXELL+ANSjGqJiv5EhqZGHvu/GWUYRgQ EseQsXNSgpEo6IuZFcZcQEw2C2ZWK2rIHguu60oRAqEpJZFC35jLwS/IJ6qrH19MA5Ns 6woQ== X-Gm-Message-State: AOAM530CtPyJxW/Tc2eIhhQghH5jW/BqZtrm5ppzZ+pW78/byKd4rtOA +tGv2VN/WWkldViYVDlEY0ZeWhGD7VGq9gHZ669OvjQRNOuPkoQKFKea8bPBaLHdNuFO3IYNVAk toPz/FhBLNTyhnPrAZn3uERw7b4C6ZLWHyAHBLIZ5HxutzFAKt2gvWPf6bmc/mftI5bX2JTEVLV 9i2KIHNeCJa3huv8JVXKSsx6Qn3yaxpgxnFbCj+jFoGkD44gTK9vR9sizpajSGahCb2VsKlBoZi JErZraGqyd9t3YKhx9ISE6d8IojjiqOZYYRqQ== X-Google-Smtp-Source: ABdhPJyC1Hcnwi81WunB4w7hRF27ZY+qrWt980miK9INznqT0rfG115palD6gz91sJQ2nP+pmSD6iA== X-Received: by 2002:a17:906:dfce:: with SMTP id jt14mr210220ejc.83.1614907059503; Thu, 04 Mar 2021 17:17:39 -0800 (PST) Received: from [10.137.0.4] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id cw14sm685584edb.8.2021.03.04.17.17.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Mar 2021 17:17:38 -0800 (PST) Subject: Re: PoC/WIP: Extended statistics on expressions To: Justin Pryzby , Dean Rasheed Cc: pgsql-hackers@postgresql.org References: <6455e0ad-2a2e-bdb0-e1f8-fd4983d1c8aa@enterprisedb.com> <087086de-1384-8374-4efc-2e7915071d5c@enterprisedb.com> <4a2918bb-49b0-ccd5-3af7-f7795941a6ad@enterprisedb.com> <958870c8-65e0-31b1-4591-b0b10e807dd9@enterprisedb.com> <20210104154524.GE9712@telsasoft.com> <20210305004334.GR29832@telsasoft.com> From: Tomas Vondra Message-ID: <85f4dd63-286c-8c7d-cbc7-2987ac0b67e8@enterprisedb.com> Date: Fri, 5 Mar 2021 02:17:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210305004334.GR29832@telsasoft.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/5/21 1:43 AM, Justin Pryzby wrote: > On Mon, Jan 04, 2021 at 09:45:24AM -0600, Justin Pryzby wrote: >> On Mon, Jan 04, 2021 at 03:34:08PM +0000, Dean Rasheed wrote: >>> * I'm not sure I understand the need for 0001. Wasn't there an earlier >>> version of this patch that just did it by re-populating the type >>> array, but which still had it as an array rather than turning it into >>> a list? Making it a list falsifies some of the comments and >>> function/variable name choices in that file. >> >> This part is from me. >> >> I can review the names if it's desired , but it'd be fine to fall back to the >> earlier patch. I thought a pglist was cleaner, but it's not needed. > > This updates the preliminary patches to address the issues Dean raised. > > One advantage of using a pglist is that we can free it by calling > list_free_deep(Typ), rather than looping to free each of its elements. > But maybe for bootstrap.c it doesn't matter, and we can just write: > | Typ = NULL; /* Leak the old Typ array */ > Thanks. I'll switch this in the next version of the patch series. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company