# pt-online-schema-change error: Error creating new table ... duplicate key

**URL:** <https://forums.percona.com/t/pt-online-schema-change-error-error-creating-new-table-duplicate-key/6403>\
**Category:** Percona Toolkit\
**Created:** [June 6, 2018, 1:44pm UTC](https://forums.percona.com/t/pt-online-schema-change-error-error-creating-new-table-duplicate-key/6403 "2018-06-06T13:44:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![remko](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@remko](https://forums.percona.com/u/remko)\
**Post date:** [June 6, 2018, 1:44pm UTC](https://forums.percona.com/t/pt-online-schema-change-error-error-creating-new-table-duplicate-key/6403/1 "2018-06-06T13:44:03Z")

</div>

When using pt-online-schema-change 3.0.10 on a table that has previously been altered using the same tool, we get the “errno: 121 Duplicate key on write or update” error.  
Googling & your bug tracker lead me to [url][[PT-394] LP #1498128: pt-online-schema-change doesn't apply underscores to foreign keys individually - Percona JIRA](https://jira.percona.com/browse/PT-394%5B/url%5D), but this issue is marked as fixed while it appears that it still exists.

I found an online blog-post detailing the issue and the fix, but I’m very uncomfortable with patching the software myself.

Is there any progress or news about the issue, or do I need to assume the tool works as intended and we need to find another workaround?

---

<div class="post-metadata">

**Author:** ![carlos.salguero](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/carlos.salguero/32/20_2.png) [@carlos.salguero](https://forums.percona.com/u/carlos.salguero)\
**Post date:** [June 7, 2018, 1:57am UTC](https://forums.percona.com/t/pt-online-schema-change-error-error-creating-new-table-duplicate-key/6403/2 "2018-06-07T01:57:54Z")

</div>

Hi,

I re-opened the ticket to validate it.  
Thanks for the error report.
