Declarative partitioning

PostgreSQL provides a way of keeping parts of table data in several different physical tables while using the same table name when querying them. This is called partitioning. Partitioning is implemented through the mechanism of table inheritance. This was mentioned in Chapter 3, PostgreSQL Basic Building Blocks. When a table inherits another table or tables, it's called a child table. The table that's inherited is a parent table. When the parent table is queried, the data from all the child tables is returned. In the context of partitioning, the parent table is called the partitioned table and the child tables are called partitions.

In older versions (before 10), PostgreSQL supported only basic partitioning, which ...

Get Learning PostgreSQL 11 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.