[Patch] Checksums for SLRU files - Mailing list pgsql-hackers

From Ivan Kartyshov
Subject [Patch] Checksums for SLRU files
Date
Msg-id fec4857dbb1ddaccaafc6f6c7f71f0a7@postgrespro.ru
Whole thread Raw
Responses Re: [Patch] Checksums for SLRU files  (Andrey Borodin <x4mmm@yandex-team.ru>)
List 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
Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: What does Time.MAX_VALUE actually represent?
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: [HACKERS] generated columns