Skip to content

Commit ba968fe

Browse files
committed
add feature highlights to README.md
1 parent ad87ba1 commit ba968fe

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
The `pg_pathman` module provides optimized partitioning mechanism and functions to manage partitions.
77

8-
The extension is compatible with PostgreSQL 9.5 (9.6 support is coming soon).
8+
The extension is compatible with PostgreSQL 9.5+.
99

1010
## Overview
1111
**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:
1212

13-
```
13+
```plpgsql
1414
CREATE TABLE test (id SERIAL PRIMARY KEY, title TEXT);
1515
CREATE TABLE test_1 (CHECK ( id >= 100 AND id < 200 )) INHERITS (test);
1616
CREATE TABLE test_2 (CHECK ( id >= 200 AND id < 300 )) INHERITS (test);
@@ -25,7 +25,7 @@ VARIABLE OP CONST
2525
```
2626
where `VARIABLE` is a partitioning key, `OP` is a comparison operator (supported operators are =, <, <=, >, >=), `CONST` is a scalar value. For example:
2727

28-
```
28+
```plpgsql
2929
WHERE id = 150
3030
```
3131

@@ -36,6 +36,22 @@ Based on the partitioning type and condition's operator, `pg_pathman` searches f
3636

3737
More interesting features are yet to come. Stay tuned!
3838

39+
## Feature highlights
40+
41+
* HASH and RANGE partitioning schemes;
42+
* Both automatic and manual partition management;
43+
* Support for integer, floating point, date and other types, including domains;
44+
* Effective query planning for partitioned tables (JOINs, subselects etc);
45+
* `RuntimeAppend` & `RuntimeMergeAppend` custom plan nodes to pick partitions at runtime;
46+
* `PartitionFilter`: an efficient drop-in replacement for INSERT triggers;
47+
* Automatic partition creation for new INSERTed data (only for RANGE partitioning);
48+
* Improved `COPY FROM\TO` statement that is able to insert rows directly into partitions;
49+
* UPDATE triggers generation out of the box (will be replaced with custom nodes too);
50+
* User-defined callbacks for partition creation event handling;
51+
* Non-blocking concurrent table partitioning;
52+
* FDW support (foreign partitions);
53+
* Various GUC toggles and configurable settings.
54+
3955
## Roadmap
4056

4157
* Implement LIST partitioning scheme;
@@ -462,6 +478,8 @@ NOTICE: 100 rows copied from part_test_2
462478
(3 rows)
463479
```
464480

481+
- You can turn foreign tables into partitions using the `attach_range_partition()` function. Rows that were meant to be inserted into parent will be redirected to foreign partitions (as usual, PartitionFilter will be involved), though by default it is prohibited to insert rows into partitions provided not by `postgres_fdw`. Only superuser is allowed to set `pg_pathman.insert_into_fdw` GUC variable.
482+
465483
### HASH partitioning
466484
Consider an example of HASH partitioning. First create a table with some integer column:
467485
```plpgsql
@@ -587,7 +605,7 @@ EXPLAIN SELECT * FROM journal WHERE dt >= '2015-06-01' AND dt < '2015-06-03';
587605
### Disabling `pg_pathman`
588606
There are several user-accessible [GUC](https://www.postgresql.org/docs/9.5/static/config-setting.html) variables designed to toggle the whole module or specific custom nodes on and off:
589607

590-
- `pg_pathman.enable` --- disable (or enable) `pg_pathman` completely
608+
- `pg_pathman.enable` --- disable (or enable) `pg_pathman` **completely**
591609
- `pg_pathman.enable_runtimeappend` --- toggle `RuntimeAppend` custom node on\off
592610
- `pg_pathman.enable_runtimemergeappend` --- toggle `RuntimeMergeAppend` custom node on\off
593611
- `pg_pathman.enable_partitionfilter` --- toggle `PartitionFilter` custom node on\off
@@ -596,7 +614,7 @@ There are several user-accessible [GUC](https://www.postgresql.org/docs/9.5/stat
596614
- `pg_pathman.override_copy` --- toggle COPY statement hooking on\off
597615

598616
To **permanently** disable `pg_pathman` for some previously partitioned table, use the `disable_pathman_for()` function:
599-
```
617+
```plpgsql
600618
SELECT disable_pathman_for('range_rel');
601619
```
602620
All sections and data will remain unchanged and will be handled by the standard PostgreSQL inheritance mechanism.

0 commit comments

Comments
 (0)