Re: [HACKERS] Online enabling of page level checksums - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] Online enabling of page level checksums
Date
Msg-id 710eb8a7-5497-e005-2fce-79feaa11bfc5@BlueTreble.com
Whole thread Raw
In response to [HACKERS] Online enabling of page level checksums  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On 1/22/17 5:13 AM, Magnus Hagander wrote:
> If the system is interrupted before the background worker is done, it
> starts over from the beginning. Previously touched blocks will be read
> and verified, but not written (because their checksum is already
> correct). This will take time, but not re-generate the WAL.

Another option would be to store a watermark of the largest block ID 
that had been verified for each relation/fork. That would be used to 
determine if checksums could be trusted, and more usefully would allow 
you to start where you left off if the verification process got interrupted.

> I think the actual functions and background worker could go in an
> extension that's installed and loaded only by those who need it. But the
> core functionality of being able to have "checksum in progress" would
> have to be in the core codebase.

If it was in contrib I think that'd be fine.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types.
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Protect syscache from bloating with negative cache entries