On Fri, Jul 11, 2008 at 9:43 AM, samantha mahindrakar
<sam.mahindrakar@gmail.com> wrote:
> Hi all....
> This is a very basic question.....can we roll back data after we run a
> query.
> I know that a delete within a transaction can be rolled back. But how about
> independent delete queries???
> If i ran a delete statement and lost data...how do i recover. I know that
> oracle has this provision of rollingback queries.
> Iam surprised iam not able to find the same in postgres.
If you were not in a query, then you cannot just roll back. This is
because each statement is an individual transaction and a delete query
"outside" a transaction is actually a begin;delete...;commit; in
nature.
Oracle only supports the rollback after commit if you have the right
module installed and activated. And it uses up a fair bit of disk
space to do it. TANSTAAFL.
IF you have PITR setup in postgresql then you can recover to a
previous point in time. Otherwise, you need to restore from backups.