Re: Online checksums patch - once again

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Online checksums patch - once again
Date: 2021-01-07 14:05:44
Message-ID: 6F525285-8509-4522-A169-6E367D449C23@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 5 Jan 2021, at 18:19, Michael Banck <michael(dot)banck(at)credativ(dot)de> wrote:

>> diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
>> index 385ac25150..e3b0048806 100644
>> --- a/doc/src/sgml/ref/initdb.sgml
>> +++ b/doc/src/sgml/ref/initdb.sgml
>> @@ -219,6 +219,7 @@ PostgreSQL documentation
>> failures will be reported in the
>> <link linkend="monitoring-pg-stat-database-view">
>> <structname>pg_stat_database</structname></link> view.
>> + See <xref linkend="checksums" /> for details.
>> </para>
>> </listitem>
>> </varlistentry>
>
>> diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml
>> index f4bc147b10..5dcfcdd2ff 100644
>> --- a/doc/src/sgml/wal.sgml
>> +++ b/doc/src/sgml/wal.sgml
>> @@ -230,6 +230,103 @@
>> </para>
>> </sect1>
>>
>> + <sect1 id="checksums">
>> + <title>Data Checksums</title>
>> + <indexterm>
>> + <primary>checksums</primary>
>> + </indexterm>
>> +
>> + <para>
>> + Data pages are not checksum protected by default, but this can optionally be
>> + enabled for a cluster. When enabled, each data page will be assigned a
>> + checksum that is updated when the page is written and verified every time
>> + the page is read. Only data pages are protected by checksums, internal data
>> + structures and temporary files are not.
>> + </para>
>> +
>> + <para>
>> + Checksums are normally enabled when the cluster is initialized using <link
>> + linkend="app-initdb-data-checksums"><application>initdb</application></link>.
>> + They can also be enabled or disabled at a later time, either as an offline
>> + operation or in a running cluster. In all cases, checksums are enabled or
>> + disabled at the full cluster level, and cannot be specified individually for
>> + databases or tables.
>> + </para>
>> +
>> + <para>
>> + The current state of checksums in the cluster can be verified by viewing the
>> + value of the read-only configuration variable <xref
>> + linkend="guc-data-checksums" /> by issuing the command <command>SHOW
>> + data_checksums</command>.
>> + </para>
>> +
>> + <para>
>> + When attempting to recover from corrupt data it may be necessary to bypass
>> + the checksum protection in order to recover data. To do this, temporarily
>> + set the configuration parameter <xref linkend="guc-ignore-checksum-failure" />.
>> + </para>
>
> I think the above is rather informative about checksums in general and
> not specific to online activation of checksusm, so could pretty much be
> committed verbatim right now, except for the "either as an offline
> operation or in a running cluster" bit which would have to be rewritten.

That might indeedbe useful regardless of the state of this patch. Robert and
Heikki: being committers who have both reviewed recent versions of the patch,
would you prefer these sections be broken out into a separate patch?

cheers ./daniel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-01-07 14:08:03 Re: Removing unneeded self joins
Previous Message Daniel Gustafsson 2021-01-07 14:03:07 Re: Online checksums patch - once again