Re: multivariate statistics v11
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-03-09T09:54:09Z
Lists: pgsql-hackers
Attachments
- 0001-teach-pull_-varno-varattno-_walker-about-RestrictInf.patch (text/x-patch) patch 0001
- 0002-shared-infrastructure-and-functional-dependencies.patch (text/x-patch) patch 0002
- 0003-clause-reduction-using-functional-dependencies.patch (text/x-patch) patch 0003
- 0004-multivariate-MCV-lists.patch (text/x-patch) patch 0004
- 0005-multivariate-histograms.patch (text/x-patch) patch 0005
- 0006-multi-statistics-estimation.patch (text/x-patch) patch 0006
- 0007-multivariate-ndistinct-coefficients.patch (text/x-patch) patch 0007
- 0008-change-how-we-apply-selectivity-to-number-of-groups-.patch (text/x-patch) patch 0008
- 0009-fixup-of-regression-tests-plans-changes-by-group-by-.patch (text/x-patch) patch 0009
Hi, thanks for looking at the patch. Sorry for the issues, attached is a version v13 that should fix them (or most of them). On Tue, 2016-03-08 at 18:24 -0800, Jeff Janes wrote: > On Tue, Mar 8, 2016 at 12:13 PM, Tomas Vondra > <tomas.vondra@2ndquadrant.com> wrote: > > Hi, > > > > attached is v11 of the patch - this is mostly a cleanup of v10, removing > > redundant code, adding missing comments, removing obsolete FIXME/TODOs > > and so on. Overall this shaves ~20kB from the patch (not a primary > > objective, though). > > This has some some conflicts with the pathification commit, in the > regression tests. Yeah, there was one join plan difference, due to the ndistinct estimation patch. Meh. Fixed. > > To avoid that, I applied it to the commit before that, 3fc6e2d7f5b652b417fa6^ Rebased to 51c0f63e. > > Having done that, In my hands, it fails its own regression tests. > Diff attached. Fixed. This was caused by making names of the statistics unique across tables, thus the regression tests started to fail when executed through 'make check' (but 'make installcheck' was still fine). The diff however also includes a segfault, apparently in processing of functional dependencies somewhere in ANALYZE. Sadly I've been unable to reproduce any such failure, despite running the tests many times (even when applied on the same commit). Is there any chance this might be due to a broken build, or something like that. If not, can you try reproducing it and investigate a bit (enable core dumps etc.)? > > It breaks contrib postgres_fdw, I'll look into that when I get a > chance of no one beats me to it. > > postgres_fdw.c: In function 'postgresGetForeignJoinPaths': > postgres_fdw.c:3623: error: too few arguments to function > 'clauselist_selectivity' > postgres_fdw.c:3642: error: too few arguments to function > 'clauselist_selectivity' Yeah, apparently there are two new calls to clauselist_selectivity, so I had to add NIL as list of conditions. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Collect and use multi-column dependency stats
- 2686ee1b7ccf 10.0 landed
-
Implement SortSupport for macaddr data type
- f90d23d0c518 10.0 cited
-
Implement multivariate n-distinct coefficients
- 7b504eb282ca 10.0 landed
-
Generate fmgr prototypes automatically
- 352a24a1f9d6 10.0 cited