Re: how can i view deleted records?

From: Steve Atkins <steve(at)blighty(dot)com>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: how can i view deleted records?
Date: 2006-04-30 02:05:35
Message-ID: C9908677-F3D5-4C0C-8BBB-A41814D6D2D0@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Apr 29, 2006, at 4:18 PM, Robby Russell wrote:

>
> On Apr 29, 2006, at 12:49 PM, Dan Black wrote:
>
>> Hello, everybody!
>> How can I view deleted records in table?
>
> SELECT * FROM recycle_bin;
>
> ;-)
>
> Just kidding... once you delete your records... they are gone.

That's.... not true.

Deleted (or modified) records don't go away until the space
they use is recycled by the VACUUM command.

However, there's no support in postgresql for any sort of
"time travel", including viewing deleted tuples. The data
is there on the disk, but there is no clean way to view it
via the database.

It's certainly not something a DBA should even think about
(outside of security issues) but deleted tuples are available
in a forensics situation, as long as vacuum hasn't been run.

Cheers,
Steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dan Black 2006-04-30 05:06:13 Ответ: how can i view deleted records?
Previous Message Robby Russell 2006-04-29 23:18:53 Re: how can i view deleted records?