public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tomas Vondra <[email protected]>
To: Zhihong Yu <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: Jaime Casanova <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: extended stats on partitioned tables
Date: Sun, 12 Dec 2021 18:45:43 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALNJ-vQrwvj=c+0-HByv6G-8fLERkH1YEHevvm=o6DHfPNL3iQ@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<20211007202646.GA9522@ahch-to>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CALNJ-vQSpBxw-gjZ--p-vo_yr2yHaXXOn_g8i=DQam_aAW3GwQ@mail.gmail.com>
	<[email protected]>
	<CALNJ-vTQkBy9_3BQbWJFodVhYMtYP63LppjdbponUgVbqtnnvQ@mail.gmail.com>
	<[email protected]>
	<CALNJ-vQrwvj=c+0-HByv6G-8fLERkH1YEHevvm=o6DHfPNL3iQ@mail.gmail.com>

On 12/12/21 14:47, Zhihong Yu wrote:
> 
> 
> On Sat, Dec 11, 2021 at 9:14 PM Tomas Vondra 
> <[email protected] <mailto:[email protected]>> 
> 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





view thread (33+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: extended stats on partitioned tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox