Skip site navigation (1) Skip section navigation (2)

Re: data loss after vacuum

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Allan Tong <actong(at)www(dot)quateams(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: data loss after vacuum
Date: 2004-01-13 01:36:33
Message-ID: 200401130136.i0D1aXv13718@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom Lane wrote:
> Allan Tong <actong(at)www(dot)quateams(dot)com> writes:
> > I'm not sure if this is the right list to send this, but any help
> > would be appreciated.  We recently encountered a problem running
> > postgres where, after a vacuum, all the data in one of our tables
> > was gone.  Now, I guess technically we don't know for sure if it
> > was indeed vacuum that caused the data loss, but it seems likely.
> 
> The vacuum output shows that it thought it was removing only 27 out
> of the nearly 700K rows.  So I don't think vacuum is directly to
> blame.  However, it would very possibly have rewritten many of the
> pages in your table, as a byproduct of moving rows, updating tuple
> commit bits, etc.
> 
> > ... when I looked at the file contents, it was almost
> > completely null'ed, so it looks like the data is really gone (though
> > shouldn't a full vacuum reclaim the space?).
> 
> You mean the pages were all-zero?  It sounds to me like a serious
> hardware failure, or possibly kernel/filesystem misfeasance.  Postgres
> would certainly not have written zeroes, but apparently what got dropped
> onto the disk platter was zeroes.  Such failures are uncommon, but
> by no means un-heard-of.

Isn't that what IDE gives you when it maps a new block to replace a
corrupted one?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-01-13 04:42:33
Subject: Re: Assertion failure in current cvs
Previous:From: Kris JurkaDate: 2004-01-13 00:09:39
Subject: Re: Assertion failure in current cvs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group