Обсуждение: How to access deleted but not vacuum'ed tuples?

Поиск
Список
Период
Сортировка

How to access deleted but not vacuum'ed tuples?

От
Robert
Дата:
Hi,

  I've accidentaly updated too much of my table and I need to un-update
it :-( Old tuples are supposed to be kept in the db till I run vacuum so
I should be able to manually fix it - but how to access old versions of
the deleted/updated tuples? Thanks for your help.

  - Robert


Re: How to access deleted but not vacuum'ed tuples?

От
Martijn van Oosterhout
Дата:
On Mon, Dec 16, 2002 at 02:47:02PM +0100, Robert wrote:
> Hi,
>
>  I've accidentaly updated too much of my table and I need to un-update
> it :-( Old tuples are supposed to be kept in the db till I run vacuum so
> I should be able to manually fix it - but how to access old versions of
> the deleted/updated tuples? Thanks for your help.

As a rule, it's impossible. You state that the tuples may kept until the
next vacuum, but that's not necessarily true. Space could be reused at any
time.

I suggest backups.

You may be able to recover by reading the data files directly but it's not
recommended. Look around for disk dumping programs that read postgres files.
pgfsck is one.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.

Вложения