Re: Online enabling of checksums

From: Michael Banck <michael(dot)banck(at)credativ(dot)de>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Online enabling of checksums
Date: 2018-03-10 12:53:54
Message-ID: 20180310125354.GA17017@nighthawk.caipicrew.dd-dns.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Mar 05, 2018 at 11:09:02AM +0100, Magnus Hagander wrote:
> On Mon, Mar 5, 2018 at 10:43 AM, Michael Banck <michael(dot)banck(at)credativ(dot)de>
> wrote:
> > I still find that confusing, but maybe it's just me. I thought the one
> > in the pageheader is the "expected" checksum, and we compare the "found"
> > or "computed/calculated" (in the page itself) against it.
> >
> > I had the same conversation with an external tool author, by the way:
>
> Maybe we should just say "on disk" for the one that's on disk, would that
> break the confusion? So "calculated %X, found %X on disk"?

I found that there is a precedent in bufpage.c:

| ereport(WARNING,
| (ERRCODE_DATA_CORRUPTED,
| errmsg("page verification failed, calculated checksum %u but expected %u",
| checksum, p->pd_checksum)));

apart from the fact that it doesn't print out the hex value (which I
find strange), it sounds like a sensible message to me. But "found %X on
disk" would work as well I guess.

Michael

--
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax: +49 2166 9901-100
Email: michael(dot)banck(at)credativ(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2018-03-10 13:03:38 Re: Concurrency bug in UPDATE of partition-key
Previous Message Tomas Vondra 2018-03-10 12:52:56 Re: remove pg_class.relhaspkey