Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tlXPt-00CpDS-Py for pgsql-docs@arkaria.postgresql.org; Fri, 21 Feb 2025 18:06:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tlXPr-00DoZJ-W8 for pgsql-docs@arkaria.postgresql.org; Fri, 21 Feb 2025 18:06:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tlXPr-00DoZB-Ki for pgsql-docs@lists.postgresql.org; Fri, 21 Feb 2025 18:06:23 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tlXPp-00299O-1v for pgsql-docs@lists.postgresql.org; Fri, 21 Feb 2025 18:06:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=p/AiAqDF6k9MoMwtHffowDi4Igxd7Y2p9YkBCXEguRg=; b=KPzoyQgPAZvA/WahZWxe+U0rpH XZeuOSVHMYOFvSUWZv45vrSBgY+xJnjNHLqPOJh/pBANC/y7CQkYqWQozjAKqo+UL+PRAoE9KtDTP Vo0E7NUW6IyGh2tf4BOmkf48R3YTxpyzyGYuszo83my4VNigVIF1KYiyfl+Q9O3wkqFl5szHox21y q+EV2Rl2J6AYy/wzouuQJDWZsyKfIN5mGaN79GQiOsgQnUGeYfiGMNNM7jsTYUUgGMh8NNw9n8JuP 9QR+0pQmmy1OTmL99AdW+ghLZ7LhPSsApnC0XfPMQo6qEjyXV87+GTrdZyR2WVuN1jGRPUp7UBiUI KOQ5puxg==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1tlXPn-008IFl-1p; Fri, 21 Feb 2025 13:06:19 -0500 Date: Fri, 21 Feb 2025 13:06:19 -0500 From: Bruce Momjian To: Laurenz Albe Cc: afripowered@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Second paragraph a little bit misleading Message-ID: References: <173928241056.707.3989867022954178032@wrigleys.postgresql.org> <43db6e44e5bc8c6f22eb439c8256f1e1bc135cf7.camel@cybertec.at> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NO6vBwJbmZmTEDhe" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --NO6vBwJbmZmTEDhe Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Feb 21, 2025 at 01:42:09PM +0100, Laurenz Albe wrote: > On Fri, 2025-02-21 at 07:00 -0500, Bruce Momjian wrote: > > > > diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml > > > > index 52b5b8f793b..705ca682777 100644 > > > > --- a/doc/src/sgml/wal.sgml > > > > +++ b/doc/src/sgml/wal.sgml > > > > @@ -246,7 +246,7 @@ > > > >     > > > >   > > > >     > > > > -   Checksums are normally enabled when the cluster is initialized using > > > +   Checksums can be enabled when the cluster is initialized using > > >      linkend="app-initdb-data-checksums">initdb. > > > >      They can also be enabled or disabled at a later time as an offline > > > >      operation. Data checksums are enabled or disabled at the full cluster > > > > > > The change looks good for the back branches, but the default has changed > > > in v18: now checksums are the default.  So "can be enabled" doesn't sound > > > right for v18.  I'd leave "are normally enabled" in HEAD. > > > > Yes, I was confused about that too, but I think we changed the code for > > the development branch and if we decide to keep the new default, we will > > change the docs later.  I didn't want to interfere with that. > > Hmpf. The documentation should always be in sync with the code, right? > So I think it should be left alone in HEAD, and if the checksum change > gets reverted, your patch should be applied to HEAD. I see your point, and I now agree that the "Reliability" section was just overlooked when the data checksum default was changed. I made a larger patch which improved the wording of data checksum mentions now that it is the default in master. I also fixed the Felix-reported problem in all the back branches through 14 --- PG 13 did not have the problem. Patches attached. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future. --NO6vBwJbmZmTEDhe Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="checksum-old.diff" diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml index 52b5b8f793b..705ca682777 100644 --- a/doc/src/sgml/wal.sgml +++ b/doc/src/sgml/wal.sgml @@ -246,7 +246,7 @@ - Checksums are normally enabled when the cluster is initialized using initdb. They can also be enabled or disabled at a later time as an offline operation. Data checksums are enabled or disabled at the full cluster --NO6vBwJbmZmTEDhe Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="master.diff" diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml index 3af065615bc..a12aa3abf01 100644 --- a/doc/src/sgml/amcheck.sgml +++ b/doc/src/sgml/amcheck.sgml @@ -466,8 +466,8 @@ SET client_min_messages = DEBUG1; - File system or storage subsystem faults where checksums happen to - simply not be enabled. + File system or storage subsystem faults when data checksums are + disabled. Note that amcheck examines a page as represented in some diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 71c4f96d054..e698e74e116 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3532,8 +3532,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage Number of data page checksum failures detected in this - database (or on a shared object), or NULL if data checksums are not - enabled. + database (or on a shared object), or NULL if data checksums are + disabled. @@ -3543,8 +3543,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage Time at which the last data page checksum failure was detected in - this database (or on a shared object), or NULL if data checksums are not - enabled. + this database (or on a shared object), or NULL if data checksums are + disabled. diff --git a/doc/src/sgml/pageinspect.sgml b/doc/src/sgml/pageinspect.sgml index 27e0598f74c..487c5d758ff 100644 --- a/doc/src/sgml/pageinspect.sgml +++ b/doc/src/sgml/pageinspect.sgml @@ -85,7 +85,7 @@ test=# SELECT * FROM page_header(get_raw_page('pg_class', 0)); The checksum field is the checksum stored in the page, which might be incorrect if the page is somehow corrupted. If - data checksums are not enabled for this instance, then the value stored + data checksums are disabled for this instance, then the value stored is meaningless. diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml index 52b5b8f793b..4fc09761115 100644 --- a/doc/src/sgml/wal.sgml +++ b/doc/src/sgml/wal.sgml @@ -194,10 +194,8 @@ - Data pages are not currently checksummed by default, though full page images - recorded in WAL records will be protected; see initdb - for details about enabling data checksums. + Data pages are checksummed by default, and full page images + recorded in WAL records are always checksum protected. @@ -238,15 +236,15 @@ - By default, data pages are not protected by checksums, but this can - optionally be enabled for a cluster. When enabled, each data page includes + By default, data pages are protected by checksums, but this can + optionally be disabled for a cluster. When enabled, each data page includes a checksum that is updated when the page is written and verified each time the page is read. Only data pages are protected by checksums; internal data structures and temporary files are not. - Checksums are normally enabled when the cluster is initialized using initdb. They can also be enabled or disabled at a later time as an offline operation. Data checksums are enabled or disabled at the full cluster --NO6vBwJbmZmTEDhe--