Re: PostgreSQL Data Loss - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: PostgreSQL Data Loss
Date
Msg-id 20070127053101.GB2917@svana.org
Whole thread Raw
In response to Re: PostgreSQL Data Loss  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: PostgreSQL Data Loss  (desrocchi@gmail.com)
List pgsql-hackers
On Sat, Jan 27, 2007 at 12:11:59AM +0000, Gregory Stark wrote:
> If this isn't run for a very long time (how long depends on how busy the
> database is, but even on extremely large databases it's usually a matter of
> months, on more normal databases it would be years) then very old records seem
> to suddenly disappear. There is a way to recover data that this has happened
> to though as long as you don't run vacuum after the data has disappeared.
>
> To repeat: If you think this may have happened DO NOT run vacuum now.

Actually, for XID wraparound a VACUUM may actually be the right thing.
I looked at this (with guidence from Tom) and we came to the conclusion
that XID wraparound will hide tuples older than 2 billion transaction,
but VACUUM will mark as frozen anything newer than 3 billion
transactions, so for 1 billion transactions you can actually get your
data back.

Expect for things like uniqueness guarentees, but they're solvable.

Not that I'm saying that the OP has this issue...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How does EXEC_BACKEND process signals?
Next
From: "Henry B. Hotz"
Date:
Subject: Re: 10 weeks to feature freeze (Pending Work)