Re: regression test failed when enabling checksum

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: regression test failed when enabling checksum
Дата
Msg-id 1364340203.21411.143.camel@sussancws0025
обсуждение исходный текст
Ответ на regression test failed when enabling checksum  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: regression test failed when enabling checksum  (Simon Riggs <simon@2ndQuadrant.com>)
Re: regression test failed when enabling checksum  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On Tue, 2013-03-26 at 02:50 +0900, Fujii Masao wrote:
> Hi,
>
> I found that the regression test failed when I created the database
> cluster with the checksum and set wal_level to archive. I think that
> there are some bugs around checksum feature. Attached is the regression.diff.

Thank you for the report. This was a significant oversight, but simple
to diagnose and fix.

There were several places that were doing something like:

   PageSetChecksumInplace
   if (use_wal)
      log_newpage
   smgrextend

Which is obviously wrong, because log_newpage set the LSN of the page,
invalidating the checksum. We need to set the checksum after
log_newpage.

Also, I noticed that copy_relation_data was doing smgrread without
validating the checksum (or page header, for that matter), so I also
fixed that.

Patch attached. Only brief testing done, so I might have missed
something. I will look more closely later.

Regards,
    Jeff Davis

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Ignore invalid indexes in pg_dump
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY