Mr.Robot
Mr.Robot

Reputation: 153

How to rollback my delete data in Postgres after delete operation?

I have not done anything. I just run this command DELETE FROM feed_republic. But I want to get my data again. What should I do?

When I run rollback I am getting the following message. Please help!

WARNING:  there is no transaction in progress

I have not used any commit or any other command unlike this question Can I rollback a transaction I've already committed? (data loss).

Upvotes: 0

Views: 21104

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 247400

PostgreSQL is running in autocommit mode, so every statement is running in its own transaction unless you explicitly start a transaction with BEGIN or START TRANSACTION.

The only way you can get your data back is by restoring from a backup.

Upvotes: 1

Related Questions