Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafdf2f5

Browse files
committed
Add documentation for declarative partitioning
1 parente06bbc7 commitafdf2f5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ More interesting features are yet to come. Stay tuned!
7070
* Non-blocking[concurrent table partitioning](#data-migration);
7171
* FDW support (foreign partitions);
7272
* Various[GUC](#disabling-pg_pathman) toggles and configurable settings.
73+
* Partial support of[`declarative partitioning`](#declarative-partitioning) (from PostgreSQL 10).
7374

7475
##Installation guide
7576
To install`pg_pathman`, execute this in the module's directory:
@@ -410,6 +411,26 @@ AS SELECT * FROM @extschema@.show_cache_stats();
410411
```
411412
Shows memory consumption of various caches.
412413

414+
##Declarative partitioning
415+
416+
From PostgreSQL 10`ATTACH PARTITION`,`DETACH PARTITION`
417+
and`CREATE TABLE .. PARTITION OF` commands could be with with tables
418+
partitioned by`pg_pathman`:
419+
420+
```plpgsql
421+
CREATETABLEchild1 (LIKE partitioned_table);
422+
423+
--- attach new partition
424+
ALTERTABLE partitioned_table ATTACH PARTITION child1
425+
FORVALUESFROM ('2015-05-01') TO ('2015-06-01');
426+
427+
--- detach the partition
428+
ALTERTABLE partitioned_table DETACH PARTITION child1;
429+
430+
-- create a partition
431+
CREATETABLEchild2 PARTITION OF partitioned_table
432+
FORVALUESIN ('2015-05-01','2015-06-01');
433+
```
413434

414435
##Custom plan nodes
415436
`pg_pathman` provides a couple of[custom plan nodes](https://wiki.postgresql.org/wiki/CustomScanAPI) which aim to reduce execution time, namely:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp