-
gp_distribution_policy
|字段名|描述|
|---|---|
|localoid|表的OID|
|policytype|分布类型'p'分区'r'复制表|
|numsegments|表分布在多少个节点上|
|diskkey|分布列的序号|
|distclass|分布列的操作类|
## GPExpand简介与具体用法
- GPExpand是Greenplum的扩容工具 扩容后,新节点没有数据,查询Plan如何做???
- 在Greenplum 5和之前的版本里会将所有的表改成随机分布,然后再ALTER成按列分布
Greenplum 6里引入了numsegments
Numsegments描述了该表连续分布的segment数量,默认与集群大小一致。对每个表执行操作时也会按照numsegment值分配Gang
增加新节点后,对每个表做EXPAND后该值会随着改成新集群的大小 table;
ALTER TABLE
gpadmin=# select * from gp_distribution_policy;
localoid | policytype | numsegments | distkey | distclass
16388 | p | 3 | 1 | 10027
16385 | p | 4 | 1 | 10027
(2 rows)
T1上的查询(未做重分布)
0 码力 |
37 页 |
1.12 MB
| 2 年前 3
-
不过,EXPAND TABLE不再是简单的REORGANIZE,这与6之前的版本不同,6版本开始,因为要支持真正意义上的在线扩容,通过gp_distribution_policy系统表的numsegments字段来识别一张表是否已经完成扩容的数据重分布操作。
### 4. 清理用于扩容的gpexpand模式。
$ gpexpand -c
对于6版本来说,扩容操作不需要重启数据库,但是,对于使 版本,不再需要将表的分布策略修改为RANDOMLY,而是通过gp_distribution_policy系统表的numsegments字段来标识表的数据分布情况,在未进行重分布之前,numsegments字段的值与原有集群的Primary数量相等,完成重分布之后,numsegments字段的值与扩容后的Primary数量相等。
qpexpand.expansion_progress是一个视图,用于查看数据重分布的进度。 样写的:
population of status_detail for partitioned tables, leaf partition cannot has different numsegments with root partition, we need to expand root partition in one shot, so just populate root partition
0 码力 |
416 页 |
6.08 MB
| 2 年前 3
-
The issue occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal numsegments, were moved.
Resolves a PL/pgSQL function infinite recursion issue by always writing a snapshot
0 码力 |
2400 页 |
18.02 MB
| 2 年前 3
-
The issue occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal numsegments, were moved.
12871 : Resolves a PL/pgSQL function infinite recursion issue by always writing a
0 码力 |
1988 页 |
20.25 MB
| 2 年前 3
-
The issue occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal numsegments, were moved.
12871 : Resolves a PL/pgSQL function infinite recursion issue by always writing a
0 码力 |
1972 页 |
20.05 MB
| 2 年前 3
-
The issue occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal numsegments, were moved.
Resolves a PL/pgSQL function infinite recursion issue by always writing a snapshot
0 码力 |
2025 页 |
33.54 MB
| 2 年前 3
-
instances.• r - Replicated policy. Table data is replicated on each segment instance.
| numsegments | integer | | The number of segment instances on which the table data is distributed me | name | | The name of this Greenplum Database system. |
| numsegments | integer | | The number of segments in the Greenplum Database system. | 0 码力 |
1893 页 |
17.62 MB
| 2 年前 3
-
The issue
occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal
numsegments, were moved.
12871
Resolves a PL/pgSQL function infinite recursion issue by always writing a snapshot
0 码力 |
2298 页 |
40.94 MB
| 2 年前 3
-
The issue
occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal
numsegments, were moved.
12871
Resolves a PL/pgSQL function infinite recursion issue by always writing a snapshot
0 码力 |
2311 页 |
17.58 MB
| 2 年前 3
-
The issue
occurred when path nodes with bottleneck locus types (Entry and SingleQE), and equal
numsegments, were moved.
12871
Resolves a PL/pgSQL function infinite recursion issue by always writing a snapshot
0 码力 |
2374 页 |
44.90 MB
| 2 年前 3