postgresql/src/test/regress
Robert Haas f49842d1ee Basic partition-wise join functionality.
Instead of joining two partitioned tables in their entirety we can, if
it is an equi-join on the partition keys, join the matching partitions
individually.  This involves teaching the planner about "other join"
rels, which are related to regular join rels in the same way that
other member rels are related to baserels.  This can use significantly
more CPU time and memory than regular join planning, because there may
now be a set of "other" rels not only for every base relation but also
for every join relation.  In most practical cases, this probably
shouldn't be a problem, because (1) it's probably unusual to join many
tables each with many partitions using the partition keys for all
joins and (2) if you do that scenario then you probably have a big
enough machine to handle the increased memory cost of planning and (3)
the resulting plan is highly likely to be better, so what you spend in
planning you'll make up on the execution side.  All the same, for now,
turn this feature off by default.

Currently, we can only perform joins between two tables whose
partitioning schemes are absolutely identical.  It would be nice to
cope with other scenarios, such as extra partitions on one side or the
other with no match on the other side, but that will have to wait for
a future patch.

Ashutosh Bapat, reviewed and tested by Rajkumar Raghuwanshi, Amit
Langote, Rafia Sabih, Thomas Munro, Dilip Kumar, Antonin Houska, Amit
Khandekar, and by me.  A few final adjustments by me.

Discussion: http://postgr.es/m/CAFjFpRfQ8GrQvzp3jA2wnLqrHmaXna-urjm_UY9BqXj=EaDTSA@mail.gmail.com
Discussion: http://postgr.es/m/CAFjFpRcitjfrULr5jfuKWRPsGUX0LQ0k8-yG0Qw2+1LBGNpMdw@mail.gmail.com
2017-10-06 11:11:10 -04:00
..
data Improve key representation for GIN jsonb_ops, and fix existence-search bug. 2014-05-09 08:41:26 -04:00
expected Basic partition-wise join functionality. 2017-10-06 11:11:10 -04:00
input Test coverage for CREATE/ALTER FOREIGN DATA WRAPPER .. HANDLER. 2017-09-15 08:07:22 -04:00
output Test coverage for CREATE/ALTER FOREIGN DATA WRAPPER .. HANDLER. 2017-09-15 08:07:22 -04:00
sql Basic partition-wise join functionality. 2017-10-06 11:11:10 -04:00
.gitignore Update .gitignore for config.cache. 2014-12-18 19:56:42 +09:00
GNUmakefile Remove ICU tests from default run 2017-03-25 00:30:26 -04:00
Makefile Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
parallel_schedule Basic partition-wise join functionality. 2017-10-06 11:11:10 -04:00
pg_regress_main.c Fix inclusions of postgres_fe.h from .h files. 2017-03-08 20:41:06 -05:00
pg_regress.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
pg_regress.h Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -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 Document and use SPI_result_code_string() 2017-10-04 22:14:21 -04:00
regressplans.sh Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
resultmap Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
serial_schedule Basic partition-wise join functionality. 2017-10-06 11:11:10 -04:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00

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