From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "samantha mahindrakar" <sam(dot)mahindrakar(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Rollback in Postgres |
Date: | 2008-07-11 17:21:57 |
Message-ID: | dcc563d10807111021k7e53b36avd0021259b7159558@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Fri, Jul 11, 2008 at 9:43 AM, samantha mahindrakar
<sam(dot)mahindrakar(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | daniel blanco | 2008-07-11 18:34:03 | function that returns a set of records and integer(both of them) |
Previous Message | Matthew T. O'Connor | 2008-07-11 17:14:57 | When was my database created |