Amazon has announced an “undo option” for its MySQL and PostgreSQL compatible relational database. Amazon Aurora Backtrack enables users to go back in time without having to restore data from a backup.
“We’ve all been there! You need to make a quick, seemingly simple fix to an important production database. You compose the query, give it a once-over, and let it run. Seconds later you realize that you forgot the WHERE clause, dropped the wrong table, or made another serious mistake, and interrupt the query, but the damage has been done. You take a deep breath, whistle through your teeth, wish that reality came with an Undo option. Now what?” wrote Jeff Barr, chief evangelist for Amazon, in a post.
With backtrack, users can specify how far back they want to rewind, and then use the database as usual, Barr explained. Once a user initiates a backtrack, the database will pose, close open connections, drop uncommitted writes and wait for the backtrack to finish to resume normal operations. In addition, if a user backtracks to far, they can still backtrack to another time. Aurora’s cloning, backups, and restores capabilities are designed to work with the new backtrack feature.
“Aurora uses a distributed, log-structured storage system (read Design Considerations for High Throughput Cloud-Native Relational Databases to learn a lot more); each change to your database generates a new log record, identified by a Log Sequence Number (LSN). Enabling the backtrack feature provisions a FIFO buffer in the cluster for storage of LSNs. This allows for quick access and recovery times measured in seconds,” Barr wrote.