转载:Postgres-XC: Waiting for online data redistribution
2013-07-28 14:29
330 查看
转载:http://francs3.blog.163.com/blog/static/405767272012654433589/
Postgres-XC: Waiting for online data redistribution
Postgresql-XC 开发组正在计划开发 "online data redistribution" 功能,即可以实现PostgreSQL-XC 数据节点的数据重分布,也可以更改表的 DISTRIBUTE 类型,例如,replicated
模式改成 hash 模式。这是个非常有效的功能,例如,在增加了数据节点后,为了提高性能,可
能需要将表的数据重新分布到所有数据节点,也可能由于某种原因,需要更改表的 DISTRIBUTE
类型,这个模块还在设计阶段。
--1 PostgreSQL-XC 数据重分布初步设想
1.fetch all the data of the table to be redistributed on Coordinator
2.Truncate the table
3.Update the catalogs to the new distribution type
4.Redistribute the data cached on Coordinator
--2 PostgreSQL-XC 数据重分布预计的优化项
1 Save materialization if it is not necessary (new distribution set to round robin, replication)
2 Truncate the table on a portion of nodes if a replicated table has its subset of nodes reduced
3 COPY only necessary data for a replicated table to new nodes if its subset of nodes is increased
4 And a couple of other things
备注:在步骤 1 的初步设想成功实现后, PostgreSQL-XC 项目组计划优化上面列举出来的事项。
--3 数据重分布命令
ALTER TABLE DISTRIBUTE BY { REPLICATION | ROUND ROBIN | { [HASH | MODULO ] ( column_name ) } } TO { GROUP groupname | NODE ( nodename [, ... ] ) } ADD NODE ( nodename [, ... ] ) DELETE NODE ( nodename [, ... ] ) |
备注:只要执行一条 “ALTER TABLE 。。。” SQL ,数据节点的数据就会自动的实现重分布,可以实现将某张表
现有数据重新布到新的数据节点;也可以删除某个数据节点的数据,还可以更改表的 DISTRIBUTE 类型,并
根据新的 DISTRIBUTE 类型重新分布表数据,功能比较强大。
--4 参考
http://michael.otacoo.com/postgresql-2/postgres-xc-online-data-redistribution/
备注:对 PostgreSQL -XC 有兴趣的朋友,可以参考 Michael Paquier 上面的 BLOG。
相关文章推荐
- 转载:Postgres-XC: online data redistribution
- Eclipse打开Android项目报Parsing Data for android-21 failed错误的解决办法(转载)
- (转载)MySQL中导入中文字符解决方案[Data too long for column XX at row n]
- 初学android studio遇到的waiting for target device to come online
- Bulk Operations Using Oracle Data Provider for .NET (ODP.NET) 转载
- 【转载】Eclipse the user operation is waiting for "buiding workspace" to complete
- 解决Android Studio AVD "waiting for target device to come online"问题
- 转载—SAS® Fundamentals For Survey Data Processing
- Android studio下 Waiting for target device to come online
- android studio 无法启动AVD,运行程序一直显示waiting for device to come online
- waiting for target device to come online
- (转载)Core Data Tutorial for iOS: Getting Started
- 转载:Complex DML queries and clause push-down in Postgres-XC
- a Storage Procedure for waiting for a database come online
- Postgres-XC源码:Utilities for GTM standby global values
- 【Android】[Problem]-"Waiting for target device to come online".
- 转载:PostgreSQL-XC : Data Replication or Distribution
- 转载:Implement Postgres-XC 0.9.7 with 8 servers
- #Paper Reading# Online Knowledge-Based Model for Big Data Topic Extraction
- Online algorithms for uploading deferrable big data to the cloud文章阅读笔记