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 1mwlh4-0008Tg-A2 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Dec 2021 13:48:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mwlh3-0000rj-1I for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Dec 2021 13:48:41 +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 1mwlh2-0000ra-Gr for pgsql-hackers@lists.postgresql.org; Mon, 13 Dec 2021 13:48:40 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mwlgv-0004Ob-9T for pgsql-hackers@postgresql.org; Mon, 13 Dec 2021 13:48:39 +0000 Received: by mail-il1-x12f.google.com with SMTP id h16so15059187ila.4 for ; Mon, 13 Dec 2021 05:48:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2+64jJvRwYIfx4CCEQ1VPOOkfJmWGuVhfO1KV/kRfc8=; b=wW7JRMfrK8nZorWXzwSfXBL+UnB4YxoZ0ro325DmiRiB4/hHr9ThDuABJ7eXd4/nAF pQksJ4U5jjd2nwRbik5yGMRYAGiFTZD8QHqPhjGiCDOSjgZDVPo1vBS14l3bDo/NXXvH O3lU54rqx+SXoSJVlnuQFbAMu0NsBY7CNhVFbIYDbSZQY6HlsU8KWXKrCOhWsjpSfXfk +GsmEQqwLVXLulOEwhmdd4BBqiIWOotL3nHbQeR2UsGi64Kr8Tz9IWVbO2ABLEVyj42D cexWY9A19fgHHuEy/qBExx1vjITNt8GALv8Ku5Se+3kOQg79xk43zcssNihre+UqzRna 4inA== 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:user-agent; bh=2+64jJvRwYIfx4CCEQ1VPOOkfJmWGuVhfO1KV/kRfc8=; b=eVFs82Fe6M27uLwiRlViM/nEO3TRqnjlvisPG5+lSonQkQoU+sz2biVOgA7uaOTR99 EL9bw8LT2GdV6mCbtM7rHXOB7t+CTcDoICvRkvUAG+MOs8c6UDKkCv+OvhnQcsh4tyjZ AJQDZYwKUszMfX4VCD44VPEppL27Q55injAWFyGNX00c4zgdm3sCUFSeLdtBWTnSwxi9 YbjOIZRKZOvRpIVn8GGx/nN01QSGt5TznpgnWTlzN2slE+hTyUYUT/UwaYIYaxzJesJA rrKeJhE1D31PaMkxfQEVgebziuC8ft/QqWHQ/sptCsZfK0wmtSuaondLA1Czk8kd72t1 mLFw== X-Gm-Message-State: AOAM53091/dIkHyXpf3h2kmuY8tPTrGEPrwlr/MfnA9K6XGAomBe4P++ F26cmt0JxplPUsexpgPsSKCQ2A== X-Google-Smtp-Source: ABdhPJzlHfw559k6/9mw8au1WGNoeeCAQiFhA5t7cHvNNg/WbpEmOPc+sRkKw6rZzAVkiuKJ5IhdqQ== X-Received: by 2002:a05:6e02:1bee:: with SMTP id y14mr2037007ilv.250.1639403312293; Mon, 13 Dec 2021 05:48:32 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k9sm8090719ilv.61.2021.12.13.05.48.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Dec 2021 05:48:31 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id BA101800C0B; Mon, 13 Dec 2021 07:48:30 -0600 (CST) Date: Mon, 13 Dec 2021 07:48:30 -0600 From: Justin Pryzby To: Tomas Vondra Cc: Zhihong Yu , Jaime Casanova , pgsql-hackers@postgresql.org Subject: Re: extended stats on partitioned tables Message-ID: <20211213134830.GS17618@telsasoft.com> References: <20211007202646.GA9522@ahch-to> <20211007224543.GH27491@telsasoft.com> <46f37069-55cb-db6a-a15a-e351a2606592@enterprisedb.com> <20211103231904.GP17618@telsasoft.com> <689accb1-76e8-5115-6ed0-336749cdca57@enterprisedb.com> <20211203052411.GU17618@telsasoft.com> <8052505e-2dd2-e8cb-26c9-cbb5dff7d750@enterprisedb.com> <20211212175255.GO17618@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Dec 12, 2021 at 10:29:39PM +0100, Tomas Vondra wrote: > > In your 0003 patch, the "if inh: break" isn't removed from examine_variable(), > > but the corresponding thing is removed everywhere else. > > Ah, you're right. And it wasn't updated in the 0002 patch either - it > should do the relkind check too, to allow partitioned tables. Fixed. I think you fixed it in 0002 (thanks) but still wasn't removed from 0003? In these comments: + * When dealing with regular inheritance trees, ignore extended stats + * (which were built without data from child rels, and thus do not + * represent them). For partitioned tables data from partitions are + * in the stats (and there's no data in the non-leaf relations), so + * in this case we do consider extended stats. I suggest to add a comment after "For partitioned tables". -- Justin