add support to pt-archiver to update rows

Bug #1395820 reported by Fernando Ipar
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Wishlist
Unassigned

Bug Description

I think pt-archiver's nibbling + throttling mechanisms would be great to use when updating potentially massive amounts of rows.
Right now the tool only supports archiving or deleting rows, so what I propose is to add a new option, like --update, that receives SQL text and runs that SQL for all matching rows, using the same nibbling and throttling controls.

This would let users run massive backfills controlling impact on replication or load.

A concrete invocation example would be:

pt-archiver --where "status = 'pending' and last_update < now() - interval 2 day" --update "set status = 'failed'"

Tags: pt-archiver
Changed in percona-toolkit:
importance: Undecided → Wishlist
tags: added: pt-archiver
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Hi,

I'm not sure but might be replace can help with this. If it's not then I think, --update can be helpful.

http://www.percona.com/doc/percona-toolkit/2.1/pt-archiver.html#cmdoption-pt-archiver--replace

Settting to confirmed as a wishlist.

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
刀尖红叶 (leafonsword) wrote :

I also think pt-archiver's nibbling + throttling mechanisms would be great for update situation, hope a new tool like pt-update could available!

Changed in percona-toolkit:
status: Confirmed → Triaged
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-856

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.