View Single Post

   
  #7 (permalink)  
Old 04-12-2008, 07:44 AM
Martijn van Oosterhout
 
Posts: n/a
Default Re: PostgreSQL Data Loss

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 recordsseem
> 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.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFuuOVIB7bNG8LQkwRAvnTAJ9AvtDRdQ1fvrvW/wfzArM85qevDgCgi3zD
+ajWmWcc0J6tA45e9iayrUM=
=T5wz
-----END PGP SIGNATURE-----

Reply With Quote