Re: pgsql: Validate page level checksums in base backups

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: pgsql: Validate page level checksums in base backups
Дата
Msg-id 115dac54-38b8-b7f8-5953-3a4a57706790@pgmasters.net
обсуждение исходный текст
Ответ на Re: pgsql: Validate page level checksums in base backups  (Michael Banck <michael.banck@credativ.de>)
Список pgsql-hackers
On 4/3/18 4:48 PM, Michael Banck wrote:
> 
> Attached is a patch which does that hopefully:
> 
> 1. creates two user tables, one large enough for at least 6 blocks
> (around 360kb), the other just one block.
> 
> 2. stops the cluster before scribbling over its data and starts it
> afterwards.
> 
> 3. uses the blocksize (and the pager header size) to determine offsets
> for scribbling.

This patch looks reasonable to me.

> I've tested it with blocksizes 8 and 32 now, the latter should make sure
> that the first table is indeed large enough, but maybe something less
> arbitrary than "10000 integers" should be used?

It might be quicker to just stop the cluster and then write out an 
arbitrary number of zero pages.  Zero pages are always considered valid 
so you can then corrupt whichever pages you want for testing.

-- 
-David
david@pgmasters.net


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

Предыдущее
От: Michael Banck
Дата:
Сообщение: Re: pgsql: Validate page level checksums in base backups
Следующее
От: Robert Haas
Дата:
Сообщение: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS