pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <hornschnorter@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Adrien Nayrat <adrien.nayrat@dalibo.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Date: Sat, 25 Nov 2017 09:14:18 -0800
Message-ID: <C96BDCC7-250F-479B-BEF4-F9F10A53120F@gmail.com> (raw)
In-Reply-To: <cf43d6de-617f-83c0-8c14-740c3fa23795@2ndquadrant.com>
References: <dfdac334-9cf2-2597-fb27-f0fb3753f435@2ndquadrant.com>
	<31ee8686-6d62-7f10-4129-7580ec74a710@dalibo.com>
	<b3688203-7c5d-2d7e-58b6-a6bb04f29b5c@2ndquadrant.com>
	<340ffd44-2d67-d39d-e54f-5a97a842cd3a@2ndquadrant.com>
	<b3e23e18-afbb-2a39-8e15-fe0a6c39a128@2ndquadrant.com>
	<67EAB5B3-F9FB-4753-8102-4D77DCFFFCD4@gmail.com>
	<cf43d6de-617f-83c0-8c14-740c3fa23795@2ndquadrant.com>


> On Nov 18, 2017, at 12:28 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> 
> Hi,
> 
> Attached is an updated version of the patch, adopting the psql describe
> changes introduced by 471d55859c11b.
> 
> regards
> 
> -- 
> Tomas Vondra                  http://www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
> <0001-multivariate-MCV-lists.patch.gz><0002-multivariate-histograms.patch.gz>

Hello Tomas,

In 0002-multivariate-histograms.patch, src/include/nodes/relation.h,
struct StatisticExtInfo, you change:

-       char            kind;                   /* statistic kind of this entry */
+       int                     kinds;                  /* statistic kinds of this entry */

to have 'kinds' apparently be a bitmask, based on reading how you use
this in the code.  The #defines just below the struct give the four bits
to be used,

#define STATS_EXT_INFO_NDISTINCT            1
#define STATS_EXT_INFO_DEPENDENCIES         2
#define STATS_EXT_INFO_MCV                  4
#define STATS_EXT_INFO_HISTOGRAM            8

except that nothing in the file indicates that this is so.  Perhaps a comment
could be added here mentioning that 'kinds' is a bitmask, and that these
#defines are related?

mark



view thread (167+ messages)  latest in thread

Message-ID: <C96BDCC7-250F-479B-BEF4-F9F10A53120F@gmail.com>
Permalink:  ../C96BDCC7-250F-479B-BEF4-F9F10A53120F@gmail.com/
Also on:    postgresql.org/message-id/C96BDCC7-250F-479B-BEF4-F9F10A53120F@gmail.com

 · 

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: pgsql-hackers@postgresql.org
  Cc: hornschnorter@gmail.com, tomas.vondra@2ndquadrant.com, adrien.nayrat@dalibo.com
  Subject: Re: [HACKERS] PATCH: multivariate histograms and MCV lists
  In-Reply-To: <C96BDCC7-250F-479B-BEF4-F9F10A53120F@gmail.com>

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

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