Restore deleted records in PostgreSQL

database, postgresql, sql

Solution

This is a similar problem as discussed here:

Can I rollback a transaction I've already committed? (data loss)

Basically, restore from backup. If you can't, you might be able to recover with `pg_dirtyread`.

If you don't have backups, stop the whole server, take a disk image of the drive, and contact a $lots data recovery expert.

Problem

I accidentally deleted all the records from 3 tables in PostgreSQL. How can i restore the data?

Original source

Related problems