You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
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.
71
71
72
72
```plpgsql
73
73
create_range_partitions(relation REGCLASS,
@@ -106,9 +106,14 @@ Performs RANGE-partitioning from specified range for `relation` by partitioning
106
106
###Data migration
107
107
108
108
```plpgsql
109
-
partition_data_concurrent(relation REGCLASS)
109
+
partition_table_concurrently(relation REGCLASS)
110
110
```
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.
112
117
113
118
###Triggers
114
119
```plpgsql
@@ -344,6 +349,15 @@ SELECT tableoid::regclass AS partition, * FROM partitioned_table;
344
349
345
350
- 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.
346
351
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;