Quick revision
The short answer
I would value flashback by its history: list the incidents where it avoided data loss, and how much faster recovery was than a restore. Then I would replace it with a combination: point-in-time recovery from WAL archives, a delayed replica for fast rewinds, history tables or audit data in the application, and application safeguards such as soft deletes, change data capture into an immutable log and reversible migrations. RPO and RTO are agreed per system and proven in drills, and the lost convenience is written into the migration business case as a real cost.
What to remember
In this answer, we saw how to value flashback by counting the incidents it resolved and the recovery time it saved, and how to replace it with point-in-time recovery from WAL archives, delayed replicas, history tables built in the database, and application safeguards such as soft deletes, change data capture and reversible migrations. Recovery objectives per system decide which tools each one gets, regular drills prove they work, and the cost of the replacements and the lost convenience belongs in the migration business case.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would value flashback by its history: list the incidents where it avoided data loss, and how much faster recovery was than a restore. Then I would replace it with a combination: point-in-time recovery from WAL archives, a delayed replica for fast rewinds, history tables or audit data in the application, and application safeguards such as soft deletes, change data capture into an immutable log and reversible migrations. RPO and RTO are agreed per system and proven in drills, and the lost convenience is written into the migration business case as a real cost.
Why this question is asked
Flashback is one of those Oracle features that quietly becomes part of how a company works. A deploy deletes the wrong rows, a DBA runs one query against the state from ten minutes ago, and the incident is over before most people hear about it. Leaving Oracle removes that safety net, and a senior leader must make sure the company does not discover this during its first bad deploy afterwards. Interviewers ask this to see whether we can value an operational capability honestly and replace it with something designed rather than assumed. In this answer, we will recap what the three flashback features do, put a value on them, look at the replacements and their costs, and see how recovery objectives and drills hold it together.
1A Quick Recap of Oracle Flashback
Flashback query lets anyone with privileges read a table as it was at an earlier time, using the undo the database already keeps: SELECT ... AS OF TIMESTAMP. It is how a DBA finds the rows a bad UPDATE overwrote and copies the old values back. Flashback table rewinds a whole table to an earlier time, also from undo, and with the recycle bin it can bring back a dropped table. Flashback database rewinds the entire database to an earlier point using flashback logs, which is much faster than restoring a backup and replaying logs. It needs Enterprise Edition and flashback logging turned on.
The window is limited by how much undo or flashback log is kept, typically minutes to a day. Within that window, recovery from a logical mistake takes minutes and usually does not require stopping the application.
2Putting a Value on the Capability
Before choosing replacements we need to know what we are replacing. I would ask the DBAs and incident records for every use of flashback over the last two or three years: what went wrong, what was recovered, and how long it took. Then for each case we estimate what the recovery would have cost without flashback, typically a restore of a copy to another server, extraction of the affected rows and a careful merge, which takes hours and specialist time.
Suppose we find 14 uses in three years, 11 of them flashback query to fix bad updates, two flashback table and one flashback database after a failed migration. Each fix took about 20 minutes; without flashback, the estimate is 4 to 8 hours each, with the application degraded for part of that time. That gives the business a concrete figure for what the capability has been worth and a clear target: we mostly need fast recovery from bad updates to a few tables.
| Feature | Uses | Time with flashback | Estimated time without |
|---|---|---|---|
| Flashback query | 11 | About 20 minutes | 4 to 6 hours each |
| Flashback table | 2 | About 30 minutes | 6 hours each |
| Flashback database | 1 | 1 hour | 8 hours plus data loss risk |
3Database-Level Replacements in PostgreSQL
PostgreSQL has no flashback, but three tools together cover most of the same ground. Point-in-time recovery restores a base backup and replays archived WAL, the write-ahead log, up to a chosen moment. Tools such as pgBackRest or Barman manage the archive. It can recover everything, but it restores a whole cluster, so for a bad UPDATE we restore to a separate server and copy the rows back. That takes time proportional to the database size.
A delayed replica is a standby that deliberately applies WAL an hour or more behind the primary, set with recovery_min_apply_delay. When a bad deploy happens, we pause replay on the delayed replica, advance it to just before the mistake, and read the old rows directly. It is the closest thing to flashback query, at the price of running another server.
History inside the database covers the most common case. PostgreSQL does not have built-in system-versioned temporal tables like some databases; we build history with triggers that copy old rows into a history table, or with an extension (check your version and extension availability). For the handful of tables where most of the flashback uses happened, that gives a permanent record we can query with ordinary SQL.
4Application-Level Safeguards
The best recovery is one we never need, and the application can make most mistakes reversible by design. Soft deletes, a deleted_at column instead of a real DELETE for important entities, make an accidental delete a one-line fix. Change data capture with a tool such as Debezium streams every row change into Kafka or another immutable log, so we have a record of every old value regardless of what the database keeps. And reversible migrations, schema changes that ship with a tested way back and that avoid destructive steps such as dropping a column in the same release that stops using it, remove the riskiest class of incident: the failed migration.
These measures also help where flashback never did. Flashback could not reach back further than its undo window; a CDC log or a history table can reach back months.
5Recovery Objectives and Drills
Each system needs agreed recovery objectives. RPO, recovery point objective, is how much data we can afford to lose, and RTO, recovery time objective, is how long recovery may take. A payments system might need an RPO of zero and an RTO of 30 minutes for a logical error on the ledger; an internal reporting system might accept a day of each. The objectives decide which replacements a system gets: the payments system gets history tables, a delayed replica and CDC; the reporting system gets PITR only.
Then we prove it. A recovery capability that has never been exercised is a hope, not a capability. I would run quarterly drills: break data in a staging copy the way a real bad deploy would, time the recovery with the documented runbook, and record the result against the RTO. The first drills usually find gaps, such as a WAL archive missing permissions or a runbook step that no longer exists.
- Agree RPO and RTOper system, with its owner
- Need minutes to undo a bad update?YesHistory tables or a delayed replicaNoPITR may be enough
- Need records older than days?YesAdd CDC to an immutable logNoRely on backups
- Add soft deletes and reversible migrationsprevent the common mistakes
- Drill quarterlytime it against the RTO
5 steps in order. Play them, or step through them one at a time.
6Including the Cost in the Business Case
Finally, honesty in the business case. Migration cases often count licence savings and leave out lost capabilities. I would add the replacement cost explicitly: the delayed replicas, the storage for WAL archives and history, the engineering time for triggers, CDC and soft deletes, and the drills. I would also state the residual risk: some recoveries will take longer than they did with flashback. If the savings still justify the move, we go ahead knowing the full price; if they do not, it is better to learn that now.
7Follow-up questions
Is PITR alone a good enough replacement?
For disaster recovery it is essential, but for logical mistakes it is slow, because we restore a whole cluster to fix a few rows. On a 2 TB database that can take hours. It is the foundation, and the other tools exist to make the common small mistakes fast to fix.
How do you stop a delayed replica from becoming a forgotten server?
Give it an owner, monitor its replay delay like any other replica, and use it in every drill. If nobody has used it for a year, the drill is what proves it still works.
Do soft deletes have downsides?
Yes. Every query must filter out deleted rows, unique constraints must account for them, and data protection rules may require real deletion after a period. So we use them for important business entities, not everywhere, and we purge on a schedule.
8Conclusion
In this answer, we saw how to value flashback by counting the incidents it resolved and the recovery time it saved, and how to replace it with point-in-time recovery from WAL archives, delayed replicas, history tables built in the database, and application safeguards such as soft deletes, change data capture and reversible migrations. Recovery objectives per system decide which tools each one gets, regular drills prove they work, and the cost of the replacements and the lost convenience belongs in the migration business case.
Open with
I would start by putting a number on what flashback has been worth, because it is easy to miss until it is gone. I would go through the incidents of the last few years where DBAs used flashback query, table or database, and record what was saved and how long it took, compared with the hours a restore and merge would have taken.
Then, if they want more
Usually most uses are flashback query fixing a bad update on a few tables, which tells us what matters most. On PostgreSQL there is no flashback, so I would combine point-in-time recovery from WAL archives as the foundation, a delayed replica with recovery_min_apply_delay for fast rewinds of recent mistakes, and history tables through triggers for the critical tables.
In the application I would add soft deletes for key entities, change data capture into an immutable log like Kafka, and a rule that migrations are reversible and never destructive in the same release.
Each system then gets agreed RPO and RTO, which decide which of these it needs, and we prove them with quarterly drills that time a real recovery. Finally I would put the cost of these replacements, and the residual risk that some recoveries are slower, into the migration business case, so the decision is made on the full price.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- PostgreSQL documentation, MySQL reference manual
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Oracle's flashback features (flashback query, flashback table, flashback database) have...": https://scrivio-interview-library.netlify.app/databases/oracle-and-sql-server/1840878a89/