]> granicus.if.org Git - postgresql/commit
Add hash partitioning.
authorRobert Haas <rhaas@postgresql.org>
Thu, 9 Nov 2017 23:07:25 +0000 (18:07 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 9 Nov 2017 23:07:44 +0000 (18:07 -0500)
commit1aba8e651ac3e37e1d2d875842de1e0ed22a651e
tree0668a250bea6bd7d872f466cb653c4cbd378e7b5
parente7397f015c9589f95f5f5b48d7a274b2f1628971
Add hash partitioning.

Hash partitioning is useful when you want to partition a growing data
set evenly.  This can be useful to keep table sizes reasonable, which
makes maintenance operations such as VACUUM faster, or to enable
partition-wise join.

At present, we still depend on constraint exclusion for partitioning
pruning, and the shape of the partition constraints for hash
partitioning is such that that doesn't work.  Work is underway to fix
that, which should both improve performance and make partitioning
pruning work with hash partitioning.

Amul Sul, reviewed and tested by Dilip Kumar, Ashutosh Bapat, Yugo
Nagata, Rajkumar Raghuwanshi, Jesper Pedersen, and by me.  A few
final tweaks also by me.

Discussion: http://postgr.es/m/CAAJ_b96fhpJAP=ALbETmeLk1Uni_GFZD938zgenhF49qgDTjaQ@mail.gmail.com
30 files changed:
doc/src/sgml/ddl.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/create_table.sgml
src/backend/catalog/partition.c
src/backend/commands/tablecmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/joinrels.c
src/backend/parser/gram.y
src/backend/parser/parse_utilcmd.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/cache/relcache.c
src/bin/psql/tab-complete.c
src/include/catalog/catversion.h
src/include/catalog/partition.h
src/include/catalog/pg_proc.h
src/include/nodes/parsenodes.h
src/test/regress/expected/alter_table.out
src/test/regress/expected/create_table.out
src/test/regress/expected/insert.out
src/test/regress/expected/partition_join.out
src/test/regress/expected/update.out
src/test/regress/sql/alter_table.sql
src/test/regress/sql/create_table.sql
src/test/regress/sql/insert.sql
src/test/regress/sql/partition_join.sql
src/test/regress/sql/update.sql
src/tools/pgindent/typedefs.list