首页 > 其他 > 详细

percona-toolkit之pt-online-schema-change在线修改表结构

时间:2015-12-28 18:46:38      阅读:313      评论:0      收藏:0      [点我收藏+]

[root@BJ-ECS-XHM-TEST-YL-19 bin]# ./pt-online-schema-change --user=checksums --password=checksums  --recursion-method="processlist"    --alter="add column birth3 int" h=10.50.12.33,P=3336,D=gaoquan,t=t1 --execut

Found 2 slaves:

  BJ-ECS-XHM-TEST-YL-21.domain.com

  BJ-ECS-XHM-TEST-YL-20.domain.com

Will check slave lag on:

  BJ-ECS-XHM-TEST-YL-21.domain.com

  BJ-ECS-XHM-TEST-YL-20.domain.com

Operation, tries, wait:

  analyze_table, 10, 1

  copy_rows, 10, 0.25

  create_triggers, 10, 1

  drop_triggers, 10, 1

  swap_tables, 10, 1

  update_foreign_keys, 10, 1

Altering `gaoquan`.`t1`...

Creating new table...

Created new table gaoquan._t1_new OK.

Waiting forever for new table `gaoquan`.`_t1_new` to replicate to BJ-ECS-XHM-TEST-YL-20.domain.com...

Altering new table...

Altered `gaoquan`.`_t1_new` OK.

2015-12-28T15:13:58 Creating triggers...

2015-12-28T15:13:58 Created triggers OK.

2015-12-28T15:13:58 Copying approximately 4 rows...

2015-12-28T15:13:58 Copied rows OK.

2015-12-28T15:13:58 Analyzing new table...

2015-12-28T15:13:58 Swapping tables...

2015-12-28T15:13:58 Swapped original and new tables OK.

2015-12-28T15:13:58 Dropping old table...

2015-12-28T15:13:58 Dropped old table `gaoquan`.`_t1_old` OK.

2015-12-28T15:13:58 Dropping triggers...

2015-12-28T15:13:58 Dropped triggers OK.

Successfully altered `gaoquan`.`t1`.


percona-toolkit之pt-online-schema-change在线修改表结构

原文:http://gaoquan.blog.51cto.com/4503718/1729168

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!