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

Commit288bf73

Browse files
committed
documentation fixes and description for replace_hash_partition() function
1 parent1709c15 commit288bf73

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ Done! Now it's time to setup your partitioning schemes.
8484
create_hash_partitions(relation REGCLASS,
8585
attributeTEXT,
8686
partitions_countINTEGER,
87-
partition_nameTEXT DEFAULTNULL,
8887
partition_dataBOOLEAN DEFAULT TRUE)
8988
```
90-
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_part_init_callback()`).
89+
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()`).
9190

9291
```plpgsql
9392
create_range_partitions(relation REGCLASS,
@@ -148,6 +147,14 @@ create_range_update_trigger(parent REGCLASS)
148147
Same as above, but for a RANGE-partitioned table.
149148

150149
###Post-creation partition management
150+
```plpgsql
151+
replace_hash_partition(old_partition REGCLASS,
152+
new_partition REGCLASS,
153+
lock_parent BOOL DEFAULT TRUE)
154+
```
155+
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.
156+
157+
151158
```plpgsql
152159
split_range_partition(partition REGCLASS,
153160
split_value ANYELEMENT,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp