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

Commitdbcce6e

Browse files
committed
Update README.md
1 parent5a16d23 commitdbcce6e

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

‎README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ create_hash_partitions(relation REGCLASS,
6767
partitions_countINTEGER,
6868
partition_nameTEXT DEFAULTNULL)
6969
```
70-
Performs HASH partitioning for`relation` by integer key`attribute`. The`partitions_count` parameter specifies the number of partitions to create; it cannot be changed afterwards. If`partition_data` is`true` then all the data will be automatically copied from the parent table to partitions. Note that data migration may took a while to finish and the table will be locked until transaction commits. See`partition_data_concurrent()` for a lock-free way to migrate data.
70+
Performs HASH partitioning for`relation` by integer key`attribute`. The`partitions_count` parameter specifies the number of partitions to create; it cannot be changed afterwards. If`partition_data` is`true` then all the data will be automatically copied from the parent table to partitions. Note that data migration may took a while to finish and the table will be locked until transaction commits. See`partition_table_concurrently()` for a lock-free way to migrate data.
7171

7272
```plpgsql
7373
create_range_partitions(relation REGCLASS,
@@ -106,9 +106,14 @@ Performs RANGE-partitioning from specified range for `relation` by partitioning
106106
###Data migration
107107

108108
```plpgsql
109-
partition_data_concurrent(relation REGCLASS)
109+
partition_table_concurrently(relation REGCLASS)
110110
```
111-
Starts a background worker to copy data from parent table to partitions. The worker utilize short transactions to copy small bunches of data (up to 10K rows per transaction) and thus doesn't significantly interfere with users activity.
111+
Starts a background worker to move data from parent table to partitions. The worker utilizes short transactions to copy small batches of data (up to 10K rows per transaction) and thus doesn't significantly interfere with user's activity.
112+
113+
```plpgsql
114+
stop_concurrent_part_task(relation REGCLASS)
115+
```
116+
Stops a background worker performing a concurrent partitioning task. Note: worker will exit after it finishes relocating a current batch.
112117

113118
###Triggers
114119
```plpgsql
@@ -344,6 +349,15 @@ SELECT tableoid::regclass AS partition, * FROM partitioned_table;
344349

345350
- Though indices on a parent table aren't particularly useful (since it's empty), they act as prototypes for indices on partitions. For each index on the parent table,`pg_pathman` will create a similar index on every partition.
346351

352+
- All running concurrent partitioning tasks can be listed using the`pathman_concurrent_part_tasks` view:
353+
```plpgsql
354+
postgres=# SELECT * FROM pathman_concurrent_part_tasks;
355+
userid | pid | dbid | relid | processed | status
356+
--------+------+-------+-------+-----------+---------
357+
dmitry |7367 |16384 | test |472000 | working
358+
(1 row)
359+
```
360+
347361
###HASH partitioning
348362
Consider an example of HASH partitioning. First create a table with some integer column:
349363
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp