# pt-table-sync, sync-to-master, replication, syncing tables on slave

**URL:** <https://forums.percona.com/t/pt-table-sync-sync-to-master-replication-syncing-tables-on-slave/2403>\
**Category:** Other Tools\
**Created:** [April 3, 2012, 5:10am UTC](https://forums.percona.com/t/pt-table-sync-sync-to-master-replication-syncing-tables-on-slave/2403 "2012-04-03T05:10:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![achapela](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@achapela](https://forums.percona.com/u/achapela)\
**Post date:** [April 3, 2012, 5:10am UTC](https://forums.percona.com/t/pt-table-sync-sync-to-master-replication-syncing-tables-on-slave/2403/1 "2012-04-03T05:10:16Z")

</div>

Hello!

I have configured RBR and sometimes it is stopping on a low use myisam table. I am pretty sure that nobody is writing on that tabl (I am pretty sure that nobody is writing on any table on slave server, of course, one developer could have a mistake but now this option is discarded).

I am receiving:  
Slave SQL: Could not execute Update\_rows event on table DB.tbl; Can’t find record in ‘tbl’, Error\_code: 1032; handler error HA\_ERR\_KEY\_NOT\_FOUND; the event’s master log mysql-bin.729866, end\_log\_pos 79139511, Error\_code: 1032

This table is small so I could sync manually without problems. I know that I should know what is happening but this table is not important and I want to have in sync to continue with replication. Now I have started with SQL\_SLAVE\_SKIP\_COUNTER=1. This is the situation.

Now I want to know how to recover from that error using pt-table-sync without slave running.

I have use the option --sync-to-master and --replication and I only get errors.

Examples:  
pt-table-sync --execute --sync-to-master D=DBt=tbl,u=user,p=pwd localhost --print

Now I get similar errors with slave running that I got with slave not running:  
Slave did not catch up to its master after waiting 60 seconds with MASTER\_POS\_WAIT. Try inceasing the --wait time, or disable this feature by specifying --wait 0. at /usr/bin/pt-table-sync line 5483. while doing Varios.reprogramaciones\_tbl

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [April 3, 2012, 7:23am UTC](https://forums.percona.com/t/pt-table-sync-sync-to-master-replication-syncing-tables-on-slave/2403/2 "2012-04-03T07:23:55Z")

</div>

Sounds like there is a lot of replication delay. pt-table-sync will require that replication is running and not delayed too much.

---

<div class="post-metadata">

**Author:** ![achapela](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@achapela](https://forums.percona.com/u/achapela)\
**Post date:** [April 3, 2012, 8:01am UTC](https://forums.percona.com/t/pt-table-sync-sync-to-master-replication-syncing-tables-on-slave/2403/3 "2012-04-03T08:01:26Z")

</div>

Yes, I executed pt-table-sync 2 hours later the error, so about 14 GB of binlog was generated. I use the option --wait 0 to get the statements to sync the table.

To get sql statements I ignore the error because I have found the table and I can do that on this table because it is small and not very important but if I have a big table (100GB table or so…) How I could manage an error like this ? If pt-table-sync needs to have a slave running it is not so util like I thought… I am thinking on an corruption on a intensive used table, how to recover from an error like happens today ?

---

<div class="post-metadata">

**Author:** ![desheikh](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@desheikh](https://forums.percona.com/u/desheikh)\
**Post date:** [January 16, 2015, 4:22am UTC](https://forums.percona.com/t/pt-table-sync-sync-to-master-replication-syncing-tables-on-slave/2403/4 "2015-01-16T04:22:23Z")

</div>

I ignore the error because I have found the table and I can do that on this table because it is small ?

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ [TABLE]  
[TR]  
[TD=“class: wysiwyg\_table\_xl65, width: 131”]Join online [a+ test](http://www.passguide.us/dumps/220-801-pdf.html) and testking [network+ certification](http://www.passguide.us/Network-plus.html) to pass exam [passguide.us](http://www.passguide.us) in first try. Our best quality and [Northwestern University](https://www.facebook.com/MedillNU) guide you well for real exam.[/TD]  
[/TR]  
[/TABLE]
