Re: need help for PostgreSQL consistency check mechanism

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: need help for PostgreSQL consistency check mechanism
Дата
Msg-id 20090427061859.GA4676@svana.org
обсуждение исходный текст
Ответ на Re: need help for PostgreSQL consistency check mechanism  ("Chen, Dongdong (GE Healthcare)" <DongdongChen@ge.com>)
Список 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@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "Chen, Dongdong (GE Healthcare)"
Дата:
Сообщение: Re: need help for PostgreSQL consistency check mechanism
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Open source and diagramming survey