From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | BluDes <DESPAMMAMIdarocchi(at)PERFAVOREtiscali(dot)it>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PostgreSQL Data Loss |
Date: | 2007-01-27 05:31:01 |
Message-ID: | 20070127053101.GB2917@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-27 06:32:50 | Re: [HACKERS] less privileged pl install |
Previous Message | Tom Lane | 2007-01-27 05:14:31 | Re: Autovacuum launcher patch |