From: Michael Banck <michael.banck@credativ.de>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Online checksums patch - once again
Date: Tue, 5 Jan 2021 18:19:31 +0100
Message-ID: <5ff49fa4.1c69fb81.658f3.04ac@mx.google.com> (raw)
In-Reply-To: <1B6F5100-6518-4864-8F26-213A45ED6E54@yesql.se>
References: <85114708-887F-4A03-A57F-249F3E0009E3@yesql.se>
<20200919021811.GA30557@telsasoft.com>
<91DC9350-7269-4B0F-AF87-AE62243D53AD@yesql.se>
<b832a496-f0aa-c7e4-cca4-6bd0af4d4a90@iki.fi>
<329E487A-E0E9-481C-985E-52888302487C@yesql.se>
<d89d50a9-06b8-dff6-d80d-9bd3a841216c@iki.fi>
<65E8272D-90AA-4194-A8F0-A8EAA0880B03@yesql.se>
<8e1cda9b-1cb9-a634-d383-f757bf67b820@iki.fi>
<4D2BC45F-CAE9-451C-AD08-FDB199008E6D@yesql.se>
<1B6F5100-6518-4864-8F26-213A45ED6E54@yesql.se>
Hi,
On Tue, Jan 05, 2021 at 12:18:07AM +0100, Daniel Gustafsson wrote:
> > On 3 Dec 2020, at 10:37, Daniel Gustafsson <daniel@yesql.se> wrote:
> > I've also done some tweaks to the tests to make them more robust as well as
> > comment updates and general tidying up here and there.
>
> Attached is a rebase of the patch on top of current HEAD.
I only looked through the documentation this time, and have one
suggestion:
> 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.
> +
> + <sect2 id="checksums-offline-enable-disable">
> + <title>Off-line Enabling of Checksums</title>
> +
> + <para>
> + The <link linkend="app-pgchecksums"><application>pg_checksums</application></link>
> + application can be used to enable or disable data checksums, as well as
> + verify checksums, on an offline cluster.
> + </para>
> +
> + </sect2>
> + </sect1>
> +
> <sect1 id="wal-intro">
> <title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
This as well.
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
Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: michael.banck@credativ.de, daniel@yesql.se, hlinnaka@iki.fi, pryzby@telsasoft.com, robertmhaas@gmail.com, magnus@hagander.net, michael@paquier.xyz, andres@anarazel.de, tomas.vondra@2ndquadrant.com, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Online checksums patch - once again
In-Reply-To: <5ff49fa4.1c69fb81.658f3.04ac@mx.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox