postgresql/src/include
Robert Haas f0e44751d7 Implement table partitioning.
Table partitioning is like table inheritance and reuses much of the
existing infrastructure, but there are some important differences.
The parent is called a partitioned table and is always empty; it may
not have indexes or non-inherited constraints, since those make no
sense for a relation with no data of its own.  The children are called
partitions and contain all of the actual data.  Each partition has an
implicit partitioning constraint.  Multiple inheritance is not
allowed, and partitioning and inheritance can't be mixed.  Partitions
can't have extra columns and may not allow nulls unless the parent
does.  Tuples inserted into the parent are automatically routed to the
correct partition, so tuple-routing ON INSERT triggers are not needed.
Tuple routing isn't yet supported for partitions which are foreign
tables, and it doesn't handle updates that cross partition boundaries.

Currently, tables can be range-partitioned or list-partitioned.  List
partitioning is limited to a single column, but range partitioning can
involve multiple columns.  A partitioning "column" can be an
expression.

Because table partitioning is less general than table inheritance, it
is hoped that it will be easier to reason about properties of
partitions, and therefore that this will serve as a better foundation
for a variety of possible optimizations, including query planner
optimizations.  The tuple routing based which this patch does based on
the implicit partitioning constraints is an example of this, but it
seems likely that many other useful optimizations are also possible.

Amit Langote, reviewed and tested by Robert Haas, Ashutosh Bapat,
Amit Kapila, Rajkumar Raghuwanshi, Corey Huinker, Jaime Casanova,
Rushabh Lathia, Erik Rijkers, among others.  Minor revisions by me.
2016-12-07 13:17:55 -05:00
..
access Improve hash index bucket split behavior. 2016-11-30 15:39:21 -05:00
bootstrap Update copyright for 2016 2016-01-02 13:33:40 -05:00
catalog Implement table partitioning. 2016-12-07 13:17:55 -05:00
commands Implement table partitioning. 2016-12-07 13:17:55 -05:00
common Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
datatype Be more careful about out-of-range dates and timestamps. 2016-03-16 19:09:28 -04:00
executor Implement table partitioning. 2016-12-07 13:17:55 -05:00
fe_utils Fix assorted places in psql to print version numbers >= 10 in new style. 2016-08-16 15:58:45 -04:00
foreign Fix typo in comment. 2016-10-18 13:43:27 -04:00
lib Permit dump/reload of not-too-large >1GB tuples 2016-12-02 00:34:01 -03:00
libpq Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
mb Update copyright for 2016 2016-01-02 13:33:40 -05:00
nodes Implement table partitioning. 2016-12-07 13:17:55 -05:00
optimizer Speed up planner's scanning for parallel-query hazards. 2016-08-19 14:03:13 -04:00
parser Implement table partitioning. 2016-12-07 13:17:55 -05:00
port Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
portability Update copyright for 2016 2016-01-02 13:33:40 -05:00
postmaster Add max_parallel_workers GUC. 2016-12-02 07:42:58 -05:00
regex Make locale-dependent regex character classes work for large char codes. 2016-09-05 17:06:29 -04:00
replication Fix Windows build for 78c8c81439 2016-12-02 09:40:36 -03:00
rewrite Add support for restrictive RLS policies 2016-12-05 15:50:55 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Bring some clarity to the defaults for the xxx_flush_after parameters. 2016-11-25 18:36:10 -05:00
tcop Stop the executor if no more tuples can be sent from worker to leader. 2016-06-06 14:52:58 -04:00
tsearch Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
utils Implement table partitioning. 2016-12-07 13:17:55 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Add likely/unlikely() branch hint macros. 2016-10-14 16:05:30 -07:00
fmgr.h Revert "Provide DLLEXPORT markers for C functions via PG_FUNCTION_INFO_V1 macro." 2016-11-07 10:19:22 -05:00
funcapi.h Widen query numbers-of-tuples-processed counters to uint64. 2016-03-12 16:05:29 -05:00
getaddrinfo.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
getopt_long.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
miscadmin.h Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Implement table partitioning. 2016-12-07 13:17:55 -05:00
pg_config.h.in Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pg_config.h.win32 Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pg_getopt.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_trace.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pgstat.h Use latch instead of select() in walreceiver 2016-12-01 20:23:28 -05:00
pgtar.h Allow pg_basebackup to stream transaction log in tar mode 2016-10-23 15:23:11 +02:00
pgtime.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
port.h Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
postgres_ext.h Add a nonlocalized version of the severity field to client error messages. 2016-08-26 16:20:17 -04:00
postgres_fe.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
postgres.h Be pickier about converting between Name and Datum. 2016-09-13 17:17:48 -04:00
rusagestub.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
windowapi.h Update copyright for 2016 2016-01-02 13:33:40 -05:00