Re: Online enabling of page level checksums

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Online enabling of page level checksums
Date: 2017-01-22 22:59:44
Message-ID: 710eb8a7-5497-e005-2fce-79feaa11bfc5@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-01-22 23:03:41 Re: Protect syscache from bloating with negative cache entries
Previous Message Tom Lane 2017-01-22 22:53:20 Re: Assignment of valid collation for SET operations on queries with UNKNOWN types.