BluDes wrote:
I made a program that uses a PostgreSQL (win32) database to save its data.

What version of PostgreSQL is this?

My customer claims that he lost lots of data reguarding his own clients and that those data had surely been saved on the database. My first guess is that he is the one who deleted the data but wants to blame someone else, obviously I can't prove it.

Did he lose all data in one table, or just some rows? Or is there some other pattern?

Could it be possible for PostgreSQL to lose its data?

Not when properly installed.

Maybe with a file corruption?

I doubt it. You'd almost certainly get warnings or errors if there's corruption.

Could it be possible to restore these data?

The first thing to do is to take a filesystem-level physical copy of the data directory to prevent further damage. Copy the data directory to another system for forensics.

You might be able to get a picture of what happened by looking at the WAL logs using the xlogviewer tool in pgfoundry.

You can also modify the PostgreSQL source code so that it shows also row versions marked as deleted, and recover the deleted data. I can't remember exactly how to do it, maybe others who have done it can fill in. A row stays physically in the file until the table is vacuumed; hopefully it hasn't been.

  Heikki Linnakangas

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to