Re: Does PostgreSQL check database integrity at startup?

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Does PostgreSQL check database integrity at startup?
Дата
Msg-id 20171230152716.GH2416@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Does PostgreSQL check database integrity at startup?  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: Does PostgreSQL check database integrity at startup?  (Melvin Davidson <melvin6925@gmail.com>)
Re: Does PostgreSQL check database integrity at startup?  (Jan Wieck <jan@wi3ck.info>)
Список pgsql-general
Greetings Alban,

* Alban Hertroys (haramrae@gmail.com) wrote:
> In fact, I don't see it mentioned explicitly anywhere, but are we actually looking at a problem?

From the discussion in the google barman group, it's clear that the file
shouldn't be zero bytes in this specific case.

> I'm not convinced by the argument that a CRC check of a 0 byte file on a standby would not detect corruption. At the
least,the CRC would be different or we would be left with a CRC on the master that we can't match any CRC's on the
slaveto if the file is larger on the master. 

As discussed, files on the primary can be different at a byte level from
those on replicas and still be perfectly valid and correct, for a
variety of reasons from hint bit differences to differences due to the
replica not being at exactly the same point as the primary.

> If CRC's can be relied on to detect corruption (which they were designed to do), then that answers Edson's question.

The checksums included in PG are page-level and therefore there simply
isn't one to look at if the file is zero bytes.

Thanks!

Stephen

Вложения

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Does PostgreSQL check database integrity at startup?
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Does PostgreSQL check database integrity at startup?