postgresql/src/test/regress
Tomas Vondra d06215d03b Allow setting statistics target for extended statistics
When building statistics, we need to decide how many rows to sample and
how accurate the resulting statistics should be. Until now, it was not
possible to explicitly define statistics target for extended statistics
objects, the value was always computed from the per-attribute targets
with a fallback to the system-wide default statistics target.

That's a bit inconvenient, as it ties together the statistics target set
for per-column and extended statistics. In some cases it may be useful
to require larger sample / higher accuracy for extended statics (or the
other way around), but with this approach that's not possible.

So this commit introduces a new command, allowing to specify statistics
target for individual extended statistics objects, overriding the value
derived from per-attribute targets (and the system default).

  ALTER STATISTICS stat_name SET STATISTICS target_value;

When determining statistics target for an extended statistics object we
first look at this explicitly set value. When this value is -1, we fall
back to the old formula, looking at the per-attribute targets first and
then the system default. This means the behavior is backwards compatible
with older PostgreSQL releases.

Author: Tomas Vondra
Discussion: https://postgr.es/m/20190618213357.vli3i23vpkset2xd@development
Reviewed-by: Kirk Jamison, Dean Rasheed
2019-09-11 00:25:51 +02:00
..
data Improve key representation for GIN jsonb_ops, and fix existence-search bug. 2014-05-09 08:41:26 -04:00
expected Allow setting statistics target for extended statistics 2019-09-11 00:25:51 +02:00
input Improve psql's \d output for partitioned indexes. 2019-07-23 17:04:21 -04:00
output Improve psql's \d output for partitioned indexes. 2019-07-23 17:04:21 -04:00
sql Allow setting statistics target for extended statistics 2019-09-11 00:25:51 +02:00
.gitignore Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
GNUmakefile Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
Makefile Fix non-GNU makefiles for AIX make. 2017-11-30 00:57:22 -08:00
parallel_schedule Run UTF8-requiring collation tests by default 2019-07-31 09:46:51 +02:00
pg_regress_main.c tableam: introduce table AM infrastructure. 2019-03-06 09:54:38 -08:00
pg_regress.c Set application_name per-test in isolation and ecpg tests. 2019-08-27 19:49:09 -04:00
pg_regress.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
README Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
regress.c Split tuptoaster.c into three separate files. 2019-09-05 13:15:10 -04:00
regressplans.sh Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
resultmap Cygwin and Mingw floating-point fixes. 2019-02-16 01:50:16 +00:00
serial_schedule Run UTF8-requiring collation tests by default 2019-07-31 09:46:51 +02:00
standby_schedule

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".