add support to pt-archiver to update rows
Bug #1395820 reported by
Fernando Ipar
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'"
Changed in percona-toolkit: | |
importance: | Undecided → Wishlist |
tags: | added: pt-archiver |
Changed in percona-toolkit: | |
status: | Confirmed → Triaged |
To post a comment you must log in.
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.