Buy Percona ServicesBuy Now!

pt-online-schema-change tmp datadir

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • yurikab
    replied
    Originally posted by carlos.salguero View Post
    The steps you mentioned are risky and won't be "online"
    You could run pt-osc twice using --data-dir. The first run will alter your table with the new structure and the second time will move it again to the original location.
    Could you help me by step ? =)

    Leave a comment:


  • carlos.salguero
    replied
    The steps you mentioned are risky and won't be "online"
    You could run pt-osc twice using --data-dir. The first run will alter your table with the new structure and the second time will move it again to the original location.

    Leave a comment:


  • yurikab
    replied
    If i'm right only one solution to do it is:
    1. use pt-online-schema-change with --data-dir, --no-drop-new-table and --no-swap-tables
    2. ALTER TABLE `old_table` DISCARD TABLESPACE;
    3. FLUSH TABLES `new_table` FOR EXPORT;
    4. move idb,cfg from new_table to old_table (mv /tmp/datadir/db/new_table.ibd /old/datadir/db/old_table.idb) and chown to mysql user
    5. UNLOCK TABLES;
    6. ALTER TABLE `old_table` IMPORT TABLESPACE;
    7. drop new_table;

    as i'm right ?

    Leave a comment:


  • yurikab
    started a topic pt-online-schema-change tmp datadir

    pt-online-schema-change tmp datadir

    Hello, is there a way to set DATA DIR for temp table (not changing original table datadir) while changing schema via pt-online-schema change ?
    I haven't enough free space for temp table.
Working...
X