Re: Detecting DB corruption

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Detecting DB corruption
Дата
Msg-id 50920CF5.7010506@ringerc.id.au
обсуждение исходный текст
Ответ на Re: Detecting DB corruption  (Scott Ribe <scott_ribe@elevated-dev.com>)
Ответы Re: Detecting DB corruption  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
Список pgsql-admin
On 11/01/2012 01:10 PM, Scott Ribe wrote:
> On Oct 31, 2012, at 8:50 PM, Craig Ringer wrote:
>
>> Seriously, if you're facing DB corruption then something is already
>> horribly wrong with your setup.
> True, but. In a past life, complaints from the db (it was a db that stored a checksum with every block) were the very
firstsymptom when something went horribly wrong with the hardware. (Partial short between wires of an internal SCSI
cable;eventually we determined that about every 1MB, 1 bit would get flipped between the controller & disk.) 
>
> So, if there were an official db verifier tool for PG, I for one would have it run periodically.
If there were a way to reliably detect corruption, so would I. As things
stand there are no block checksums, so if a bit gets flipped in some
random `text` field you're never going to know, corruption-checker or
no. Some forms of random corruption - like bad blocks on disks causing
I/O errors, zeroed blocks, truncated files, etc - will become apparent
with general checking, but others won't be detectable unless you know
what the expected vs actual data is.

If page checksumming or any other reliable method of detecting possible
incipient corruption were available I'd quite likely want to use it for
much the same reason you outlined. For that matter, if there were a
general "sanity check my tables and indexes" tool I'd probably use that
too. However, no such tool exists - and in a good setup, none should be
needed. I'd want to use one anyway purely out of paranoia.

--
Craig Ringer


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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: Detecting DB corruption
Следующее
От: "Gunnar \"Nick\" Bluth"
Дата:
Сообщение: Re: Detecting DB corruption