Re: after using pg_resetxlog, db lost

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wang_zc(at)yahoo(dot)co(dot)uk
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: after using pg_resetxlog, db lost
Date: 2004-06-01 14:16:27
Message-ID: 2580.1086099387@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?q?zhicheng=20wang?= <wang_zc(at)yahoo(dot)co(dot)uk> writes:
> Jun 1 10:43:55 linux708 postgres[5537]: [30] LOG: database system shutdown was interrupted at 2004-05-28 16:32:08 BST
> Jun 1 10:43:55 linux708 postgres[5537]: [31] LOG: open of /var/lib/pgsql/data/pg_xlog/0000000000000000 (log file 0, segment 0) failed: No such file or directory
> Jun 1 10:43:55 linux708 postgres[5537]: [32] LOG: invalid primary checkpoint record
> Jun 1 10:43:55 linux708 postgres[5537]: [33] LOG: open of /var/lib/pgsql/data/pg_xlog/0000000000000000 (log file 0, segment 0) failed: No such file or directory
> Jun 1 10:43:55 linux708 postgres[5537]: [34] LOG: invalid secondary checkpoint record
> Jun 1 10:43:55 linux708 postgres[5537]: [35] PANIC: unable to locate a valid checkpoint record

Hm, was this a very new Postgres installation? The links to log file
0/0 suggest that it was so new as to not yet have accumulated 16Mb worth
of WAL traffic ... which is not a lot of traffic.

If the links are accurate then what must have happened is that your disk
subsystem lost the physical xlog file.

If the links are not accurate then this suggests corruption of the
pg_control file (i.e., overwriting those fields with zeroes). I find
this idea a bit improbable, though, because the pg_control file has
a CRC64 checksum. It seems very unlikely that corruption of the
pg_control file wouldn't have been noticed and complained of.

In any case, it seems that your upgrade to new disk hardware did not go
as smoothly as you thought. I'd be pretty surprised if the Postgres
files are the only ones that got corrupted --- you'd better look around
and find out what else is broken :-(

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Graham 2004-06-01 14:31:36 Re: Running Totals and other stuff....
Previous Message Richard Huxton 2004-06-01 14:04:13 Re: Running Totals and other stuff....