Skip to content

Commit 9ed7d5d

Browse files
committed
documentation update for hash partitioning
1 parent cceaae1 commit 9ed7d5d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ Done! Now it's time to setup your partitioning schemes.
6464
```plpgsql
6565
create_hash_partitions(relation REGCLASS,
6666
attribute TEXT,
67-
partitions_count INTEGER)
67+
partitions_count INTEGER,
68+
partition_name TEXT DEFAULT NULL)
6869
```
69-
Performs HASH partitioning for `relation` by integer key `attribute`. Creates `partitions_count` partitions and trigger on INSERT. All the data will be automatically copied from the parent to partitions.
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.
7071

7172
```plpgsql
7273
create_range_partitions(relation REGCLASS,
@@ -83,7 +84,7 @@ create_range_partitions(relation TEXT,
8384
count INTEGER DEFAULT NULL,
8485
partition_data BOOLEAN DEFAULT true)
8586
```
86-
Performs RANGE partitioning for `relation` by partitioning key `attribute`. `start_value` argument specifies initial value, `interval` sets the range of values in a single partition, `count` is the number of premade partitions (if not set then pathman tries to determine it based on attribute values). 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.
87+
Performs RANGE partitioning for `relation` by partitioning key `attribute`. `start_value` argument specifies initial value, `interval` sets the range of values in a single partition, `count` is the number of premade partitions (if not set then pathman tries to determine it based on attribute values).
8788

8889
```plpgsql
8990
create_partitions_from_range(relation REGCLASS,
@@ -123,7 +124,7 @@ Same as above, but for a RANGE-partitioned table.
123124
```plpgsql
124125
split_range_partition(partition REGCLASS,
125126
value ANYELEMENT,
126-
partition_name TEXT DEFAULT NULL)
127+
partition_name TEXT DEFAULT NULL,)
127128
```
128129
Split RANGE `partition` in two by `value`.
129130

0 commit comments

Comments
 (0)