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

Commit1e0e9b5

Browse files
committed
pathman: doc updated
1 parentfbb5ff3 commit1e0e9b5

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

‎contrib/pg_pathman/README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,11 @@ Performs RANGE-partitioning from specified range for `relation` by partitioning
9292

9393
###Utilities
9494
```
95-
partition_data(parent text)
96-
```
97-
Copies data from parent table to its partitions.
98-
```
9995
create_hash_update_trigger(parent TEXT)
10096
```
10197
Creates the trigger on UPDATE for HASH partitions. The UPDATE trigger isn't created by default because of overhead. It is useful in cases when key attribute could be changed.
10298
```
103-
create_hash_update_trigger(parent TEXT)
99+
create_range_update_trigger(parent TEXT)
104100
```
105101
Same as above for RANGE sections.
106102

@@ -139,10 +135,7 @@ If partitions are supposed to have indexes, then they should be created for pare
139135
```
140136
SELECT create_hash_partitions('hash_rel', 'value', 100);
141137
```
142-
This will create new partitions but data will still be in the parent table. To move data to the corresponding partitions use partition_data() function:
143-
```
144-
SELECT partition_data('hash_rel');
145-
```
138+
This will create new partitions and move the data from parent to partitions.
146139
Here is an example of the query with filtering by partitioning key and its plan:
147140
```
148141
SELECT * FROM hash_rel WHERE value = 1234;
@@ -176,10 +169,7 @@ Run create_range_partitions() function to create partitions so that each partiti
176169
```
177170
SELECT create_range_partitions('range_rel', 'dt', '2010-01-01'::date, '1 month'::interval, 60);
178171
```
179-
It will create 60 partitions. Now let's move data from the parent to partitions.
180-
```
181-
SELECT partition_data('range_rel');
182-
```
172+
It will create 60 partitions and move the data from parent to partitions.
183173
To merge to adjacent partitions run merge_range_partitions() function:
184174
```
185175
SELECT merge_range_partitions('range_rel_1', 'range_rel_2');

‎contrib/pg_pathman/README.rus.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,11 @@ create_partitions_from_range(
9494

9595
###Утилиты
9696
```
97-
partition_data(parent text)
98-
```
99-
Копирует данные из родительской таблицы`parent` в дочерние секции.
100-
```
10197
create_hash_update_trigger(parent TEXT)
10298
```
10399
Создает триггер на UPDATE для HASH секций. По-умолчанию триггер на обновление данных не создается, т.к. это создает дополнительные накладные расходы. Триггер полезен только в том случае, когда меняется значение ключевого аттрибута.
104100
```
105-
create_hash_update_trigger(parent TEXT)
101+
create_range_update_trigger(parent TEXT)
106102
```
107103
Аналогично предыдущей, но для RANGE секций.
108104

@@ -141,10 +137,6 @@ INSERT INTO hash_rel (value) SELECT g FROM generate_series(1, 10000) as g;
141137
```
142138
SELECT create_hash_partitions('hash_rel', 'value', 100);
143139
```
144-
Перенесем данные из родительской таблицы в дочерние секции.
145-
```
146-
SELECT partition_data('hash_rel');
147-
```
148140
Пример построения плана для запроса с фильтрацией по ключевому полю:
149141
```
150142
SELECT * FROM hash_rel WHERE value = 1234;
@@ -179,11 +171,6 @@ INSERT INTO range_rel (dt) SELECT g FROM generate_series('2010-01-01'::date, '20
179171
```
180172
SELECT create_range_partitions('range_rel', 'dt', '2010-01-01'::date, '1 month'::interval, 60);
181173
```
182-
183-
Перенесем данные из родительской таблицы в дочерние секции.
184-
```
185-
SELECT partition_data('range_rel');
186-
```
187174
Объединим секции первые две секции:
188175
```
189176
SELECT merge_range_partitions('range_rel_1', 'range_rel_2');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp