[Patch] Checksums for SLRU files

Поиск
Список
Период
Сортировка
От Ivan Kartyshov
Тема [Patch] Checksums for SLRU files
Дата
Msg-id fec4857dbb1ddaccaafc6f6c7f71f0a7@postgrespro.ru
обсуждение исходный текст
Ответы Re: [Patch] Checksums for SLRU files  (Andrey Borodin <x4mmm@yandex-team.ru>)
Список pgsql-hackers
Hello, I`d like to show my implementation of SLRU file protection with 
checksums.

It only has effect if checksums on database are enabled.
Detection of a checksum failure during a read normally causes PostgreSQL 
to report an error. Setting ignore_slru_checksum_failure to on causes 
the system to ignore the failure (but still report a warning), and  
continue processing. It is similary like ignore_checksum_failure but for 
some slru files. The default setting is true, and it can only be changed 
by a database admin. For changes, use ALTER SYSTEM and reload 
configuration:
ALTER SYSTEM SET ignore_slru_checksum_failure = off;
SELECT pg_reload_conf();

Impementation:
1) Checksum writes in last 2 bytes of every page
2) Checksum calculates and write down in page happens when page writes 
on disk (same as relation does it)
3) Checking checksum happens same as relation does it, on 
Read\PhysicalRead when GUC ignore_slru_checksum_failure = false
{default = true}.

I would like to hear your thoughts over my patch.

-- 
Ivan Kartyshov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: What does Time.MAX_VALUE actually represent?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Re: [HACKERS] generated columns