From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "Chen, Dongdong (GE Healthcare)" <DongdongChen(at)ge(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Filip Rembia?kowski <plk(dot)zuber(at)gmail(dot)com>, jd(at)commandprompt(dot)com, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: need help for PostgreSQL consistency check mechanism |
Date: | 2009-04-27 06:18:59 |
Message-ID: | 20090427061859.GA4676@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Apr 27, 2009 at 10:13:47AM +0800, Chen, Dongdong (GE
> Healthcare) wrote: Checksum is my primitive thought, is there table
> level checksum? Our objective is like this: If shutdown normally, OK.
> If shutdown ABNORMALLY, then reboot the OS, check whether there is
> database records loss or damage, if NO, OK, start app as usual; if
> YES, run restore app(currently pg_restore). All this should be done
> automatically without manual operating and avoid restoring if data
> records are in good condition.
PostgreSQL knows when it has been shutdown abnormally and will recover
to a consistant state (i.e. rollback all uncommitted transactions).
Whether this constitutes "database record loss" depends on your
application. I personally havn't managed to actually corrupt Postgres
enough to lose anything, but it happens.
Just make sure your disk cache is safe, otherwise all bets are off.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2009-04-27 11:42:10 | Re: Open source and diagramming survey |
Previous Message | Chen, Dongdong (GE Healthcare) | 2009-04-27 02:13:47 | Re: need help for PostgreSQL consistency check mechanism |