Re: extended stats on partitioned tables - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: extended stats on partitioned tables
Date
Msg-id c197968e-431b-997e-7a06-4c44afcb4d27@enterprisedb.com
Whole thread Raw
In response to Re: extended stats on partitioned tables  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
On 12/12/21 14:47, Zhihong Yu wrote:
> 
> 
> On Sat, Dec 11, 2021 at 9:14 PM Tomas Vondra 
> <tomas.vondra@enterprisedb.com <mailto:tomas.vondra@enterprisedb.com>> 
> wrote:
 >
> ...
> 
>      > +       /* skip statistics with mismatching stxdinherit value */
>      > +       if (stat->inherit != rte->inh)
>      >
>      > Should a log be added for the above case ?
>      >
> 
>     Why should we log this? It's an entirely expected case - there's a
>     mismatch between inheritance for the relation and statistics, simply
>     skipping it is the right thing to do.
> 
> 
> Hi,
> I agree that skipping should be fine (to avoid too much logging).
> 

I'm not sure it's related to the amount of logging, really. It'd be just 
noise without any practical use, even for debugging purposes. If you 
have an inheritance tree, it'll automatically have one set of statistics 
for inh=true and one for inh=false. And this condition will always skip 
one of those, depending on what query is being estimated.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: "Gunnar \"Nick\" Bluth"
Date:
Subject: [PATCH] pg_stat_toast
Next
From: Tomas Vondra
Date:
Subject: Re: extended stats on partitioned tables