Re: [DESIGN] Incremental checksums

From: David Christensen <david(at)endpoint(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: [DESIGN] Incremental checksums
Date: 2015-07-16 12:46:47
Message-ID: 6AAE6E64-F17B-4577-A5BB-5DC6411C801D@endpoint.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > > - pg_disable_checksums(void) => turn checksums off for a cluster. Sets the state to "disabled", which means bg_worker will not do anything.
> > > >
> > > > - pg_request_checksum_cycle(void) => if checksums are "enabled", increment the data_checksum_cycle counter and set the state to "enabling".
> > > >
> > >
> > > If the cluster is already enabled for checksums, then what is
> > > the need for any other action?
> >
> > You are assuming this is a one-way action.
> >
>
> No, I was confused by the state (enabling) this function will set.

Okay.

> > Requesting an explicit checksum cycle would be desirable in the case where you want to proactively verify there is no cluster corruption to be found.
> >
>
> Sure, but I think that is different from setting the state to enabling.
> In your proposal above, in enabling state cluster needs to write
> checksums, where for such a feature you only need read validation.

With “revalidating” since your database is still actively making changes, you need to validate writes too (think new tables, etc). “Enabling” needs reads unvalidated because you’re starting from an unknown state (i.e., not checksummed already).

Thanks,

David
--
David Christensen
PostgreSQL Team Manager
End Point Corporation
david(at)endpoint(dot)com
785-727-1171

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-07-16 13:25:47 Re: TABLESAMPLE patch is really in pretty sad shape
Previous Message Amit Kapila 2015-07-16 12:17:31 Re: optimizing vacuum truncation scans