Re: Losing records when server hang - Mailing list pgsql-general

From Tom Lane
Subject Re: Losing records when server hang
Date
Msg-id 15482.1092067399@sss.pgh.pa.us
Whole thread Raw
In response to Re: Losing records when server hang  (lec <limec@streamyx.com>)
Responses Re: Losing records when server hang  (lec <limec@streamyx.com>)
Re: Losing records when server hang  (Marco Colombo <marco@esi.it>)
List pgsql-general
lec <limec@streamyx.com> writes:
> It's a SCSI, RAID-5 on a Dell server.

> The hardware actually "hang". The Dell engineers came and replaced the
> motherboard but couldn't tell what the actual fault was.

> Commit as in 'COMMIT'. 'Records' 1,2,3,4,5,6,7,8,9,10 are actually
> transactions. I'm as puzzled as to why I lost the transactions in the
> middle but got the last transaction.

I'm puzzled too.  I don't suppose you have the postmaster log from when
it was trying to recover from the crash?  Or even better, copies of the
WAL files?

A possible theory has to do with corruption of the WAL log.  For
instance, transactions 1-10 are all down to disk in WAL (or at least the
kernel told postgres the writes were done) and for one reason or another
the buffer manager chances to flush the page containing record 10 out
to its data file before the other records' pages.  Now the system hangs.
After reboot, if the WAL log is unreadable beyond transaction 1 then the
database would come up with transaction 1 replayed, 2-10 not replayed,
but 10's data is out there anyway.

However this would seem to imply disk drive misfeasance above and beyond
your motherboard problem.

            regards, tom lane

pgsql-general by date:

Previous
From: Robby Russell
Date:
Subject: Re: Stored Procedure - Iam totally lost!
Next
From: Guy Fraser
Date:
Subject: Re: RFC: array literal syntax