News for hackers. Stuff that matters.
Re:Amazon Aurora Backtrack by cody8295 on Thursday May 10, 2018 @03:15PM (#17042086)
I don't know anything about Aurora and maybe I'm missing something. But why not just wrap everything in a TRANSACTION and then do a ROLLBACK if there's an issue?
Re:Amazon Aurora Backtrack by ben509 on Thursday May 10, 2018 @06:12PM (#17043399)
This would be for deploying a database migration that hoses something. For instance, we had a migration that touched a bunch of tables and, due to a triggered procedure, it blew away all the modification dates.

TBH, I'm not sure how useful it is compared to the normal PITR. My usual guidance on recovering after a database fuck up is "put the app into maintenance mode and the database in read-only, do your investigation, run PITR, port user activity to the backup, do spot checks to determine everything got through, roll the app back to before the change, take the old database down, point the app at the new database, bring the system back online."

I'm sure a manager is thinking, "oh, we can be back online in 5 minutes, amazing!" But just because something broke doesn't mean users stopped hitting your database! You can't just hit Undo and throw all that out!

Re:Amazon Aurora Backtrack by awgupta on Tuesday May 15, 2018 @10:20PM (#17079530)
You can also clone the database volume in Aurora and then just backtrack one of the volumes. That should help you ensure you have a version available for forensic analysis.
Re:Amazon Aurora Backtrack by wiredone on Thursday May 10, 2018 @03:37PM (#17042266)
Because nearly everyone I know has some memory where at a less experienced point in their engineering career they wrote:

delete from ImportantTable where id = 1234

... and forgot to select the second line in some query editor before running.

Re:Amazon Aurora Backtrack by ben174 on Thursday May 10, 2018 @04:41PM (#17042768)
There is usually an option to disable delete statements which do not contain a where clause. And if you really want to run that statement you'd need to write:

    delete from ImportantTable where 1 = 1;
But yea, I get your point.
Re:Amazon Aurora Backtrack by mark-wagner on Thursday May 10, 2018 @05:54PM (#17043290)
For mysql it is "--i-am-a-dummy". I wish SQL supported putting the where clause first: "where X = Y update..."
Re:Amazon Aurora Backtrack by tanilama on Friday May 11, 2018 @02:20AM (#17045306)
First, Transaction is not free, there is overhead comes with it. Second, it could be upstream software bug, that writes wrong data to the DB, you can possibly overwrite that.
Re:Amazon Aurora Backtrack by dx034 on Thursday May 10, 2018 @03:27PM (#17042179)
That's for the cases where you only realize the mistake after the commit. Often because other queries suddenly fail.
Re:Amazon Aurora Backtrack by awgupta on Tuesday May 15, 2018 @10:21PM (#17079535)
Also, generally DDL statements like DROP TABLE typically autocommit.