8000 update README.md · postgrespro/pg_pathman@945f224 · GitHub
[go: up one dir, main page]

Skip to content

Commit 945f224

Browse files
committed
update README.md
1 parent bc504d4 commit 945f224

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,27 @@ The extension is compatible with:
1212
* Postgres Pro Standard 9.5, 9.6;
1313
* Postgres Pro Enterprise;
1414

15-
By the way, we have a growing Wiki [out there](https://github.com/postgrespro/pg_pathman/wiki).
15+
Take a look at our Wiki [out there](https://github.com/postgrespro/pg_pathman/wiki).
1616

1717
## Overview
18-
**Partitioning** means splitting one large table into smaller pieces. Each row in such table is moved to a single partition according to the partitioning key. PostgreSQL supports partitioning via table inheritance: each partition must be created as a child table with CHECK CONSTRAINT. For example:
18+
**Partitioning** means splitting one large table into smaller pieces. Each row in such table is moved to a single partition according to the partitioning key. PostgreSQL <= 10 supports partitioning via table inheritance: each partition must be created as a child table with CHECK CONSTRAINT:
1919

2020
```plpgsql
2121
CREATE TABLE test (id SERIAL PRIMARY KEY, title TEXT);
2222
CREATE TABLE test_1 (CHECK ( id >= 100 AND id < 200 )) INHERITS (test);
2323
CREATE TABLE test_2 (CHECK ( id >= 200 AND id < 300 )) INHERITS (test);
2424
```
2525

26+
PostgreSQL 10 provides native partitioning:
27+
28+
```plpgsql
29+
CREATE TABLE test(id int4, value text) PARTITION BY RANGE(id);
30+
CREATE TABLE test_1 PARTITION OF test FOR VALUES FROM (1) TO (10);
31+
CREATE TABLE test_2 PARTITION OF test FOR VALUES FROM (10) TO (20);
32+
```
33+
34+
It's not so different from the classic approach; there are implicit check constraints, and most of its limitations are still relevant.
35+
2636
Despite the flexibility, this approach forces the planner to perform an exhaustive search and to check constraints on each partition to determine whether it should be present in the plan or not. Large amount of partitions may result in significant planning overhead.
2737

2838
The `pg_pathman` module features partition managing functions and optimized planning mechanism which utilizes knowledge of the partitions' structure. It stores partitioning configuration in the `pathman_config` table; each row contains a single entry for a partitioned table (relation name, partitioning column and its type). During the initialization stage the `pg_pathman` module caches some information about child partitions in the shared memory, which is used later for plan construction. Before a SELECT query is executed, `pg_pathman` traverses the condition tree in search of expressions like:
@@ -60,13 +70,6 @@ More interesting features are yet to come. Stay tuned!
6070
* FDW support (foreign partitions);
6171
* Various GUC toggles and configurable settings.
6272

63-
## Roadmap
64-
65-
* Multi-level partitioning (ver 1.5);
66-
* Improved referential integrity + foreign keys on partitioned tables (ver 1.5);
67-
68-
Take a look at [this page](https://github.com/postgrespro/pg_pathman/wiki/Roadmap);
69-
7073
## Installation guide
7174
To install `pg_pathman`, execute this in the module's directory:
7275
```shell

0 commit comments

Comments
 (0)
0