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
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,9 @@ Done! Now it's time to setup your partitioning schemes.
84
84
create_hash_partitions(relation REGCLASS,
85
85
attributeTEXT,
86
86
partitions_countINTEGER,
87
-
partition_dataBOOLEAN DEFAULT TRUE)
87
+
partition_dataBOOLEAN DEFAULT TRUE,
88
+
partition_namesTEXT[] DEFAULTNULL,
89
+
tablespacesTEXT[] DEFAULTNULL)
88
90
```
89
91
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. Partition creation callback is invoked for each partition if set beforehand (see`set_init_callback()`).
90
92
@@ -148,9 +150,9 @@ Same as above, but for a RANGE-partitioned table.
148
150
149
151
###Post-creation partition management
150
152
```plpgsql
151
-
replace_hash_partition(old_partitionREGCLASS,
152
-
new_partitionREGCLASS,
153
-
lock_parentBOOL DEFAULT TRUE)
153
+
replace_hash_partition(old_partition REGCLASS,
154
+
new_partition REGCLASS,
155
+
lock_parent BOOL DEFAULT TRUE)
154
156
```
155
157
Replaces specified partition of HASH-partitioned table with another table. The`lock_parent` parameter will prevent any INSERT/UPDATE/ALTER TABLE queries to parent table.
Merge two adjacent RANGE partitions. First, data from`partition2` is copied to`partition1`, then`partition2` is removed.
169
171
170
172
```plpgsql
171
-
merge_range_partitions(partitionsREGCLASS[])
173
+
merge_range_partitions(partitions REGCLASS[])
172
174
```
173
175
Merge several adjacent RANGE partitions (partitions must be specified in ascending or descending order). All the data will be accumulated in the first partition.