Re: 16-bit page checksums for 9.2

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: 16-bit page checksums for 9.2
Дата
Msg-id 4F03FC1F02000025000442F5@gw.wicourts.gov
обсуждение исходный текст
Ответ на 16-bit page checksums for 9.2  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs  wrote:
> We can either
> 
> (1) report all errors on a page, including errors that don't change
> PostgreSQL data. This involves checksumming long strings of zeroes,
> which the checksum algorithm can't tell apart from long strings of
> ones.
What do you mean?  Each byte which goes into the checksum, and the
position of that byte influences the outcome once you've got a
non-zero value in sum1.  The number of leading NIL bytes would not
affect the outcome unless you seed the calculation with something
non-zero, but including the page header in the calculation seems to
cover that OK.
> (2) report only errors that changed PostgreSQL data.
> 
> We already do (1) for WAL CRCs so doing the same thing for page
> checksums makes sense and is much faster.
> 
> If enough people think we should do (2) then its a simple change to
> the patch.
To me, (1) makes more sense, but it seems to me you're currently
doing (2) because you check in three parts, skipping the free space
in the middle of the page.
-Kevin


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

Предыдущее
От: "Tomas Vondra"
Дата:
Сообщение: Re: pgstat wait timeout
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: 16-bit page checksums for 9.2