Re: Gotchas about pg_verify_checksums - Mailing list pgsql-hackers

From Michael Banck
Subject Re: Gotchas about pg_verify_checksums
Date
Msg-id 20180417194346.GA20312@nighthawk.caipicrew.dd-dns.de
Whole thread Raw
In response to Re: Gotchas about pg_verify_checksums  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Gotchas about pg_verify_checksums
List pgsql-hackers
Hi Michael,

On Mon, Apr 16, 2018 at 11:30:30AM +0900, Michael Paquier wrote:
> On Thu, Apr 12, 2018 at 05:47:29AM +0900, Michael Paquier wrote:
> > On Wed, Apr 11, 2018 at 10:21:29PM +0200, Daniel Gustafsson wrote:
> >> Naming it pg_checksums, with only verification as an option, seems to me to
> >> imply future direction for 12 more than what pg_verify_checksums does.  I would
> >> leave it the way it is, but I don’t have very strong opinions (or any plans on
> >> hacking on offline checksum enabling for that matter).
> > 
> > Okay, I am fine to let such decision to you and Magnus at the end as the
> > authors and committers of the thing.  I think that I will just hack out
> > this tool myself after reusing this code if you don't mind of course..
> 
> If anybody on this list is interested, I have extended
> pg_verify_checksums into this tool I called pg_checksums which is able
> to do a couple of more things like enable checksums, disable checksums,
> bypass the final fsync of the data folder with a --no-sync.  The core
> feature to verify checksums is still around of course.
> 
> This allows anybody to control the checksums of a cluster that was shut
> down cleanly, which I wanted for some time myself:
> https://github.com/michaelpq/pg_plugins/tree/master/pg_checksums

I didn't see this part of the thread immediately, but following a
discussion with Magnus on offline activation/deactivation of checksums
at PGConf.DE, I independently adapted pg_verify_checksums in a very
similar fashion on my way back from the conference, also renaming it to
pg_checksums etc... 

> That's only compatible with v11, but it can be easily tweaked to be
> compatible with past versions.  I am of course not proposing to include
> that in v11 or above.  If anybody wishes to do a proposal based on that
> stuff for v12, please feel free to.

I think it is useful for legacy installation which "forgot" to enable
checksums when they setup their instances and/or came around that they
are useful in the meantime and are willing to take the downtime in order
to activate them. 

So I decided to add some support for earlier version in my version of
the program, and pushed it to https://github.com/credativ/pg_checksums
if anybody is interested in that. I have to admit that it is quite less
fancy than your version.


Michael

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.banck@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: reloption to prevent VACUUM from truncating empty pages at theend of relation
Next
From: Alvaro Herrera
Date:
Subject: Append's first_partial_plan