From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix theoretical torn page hazard.
Date: Fri, 11 Nov 2022 20:51:57 +0000
Message-ID: <E1otb0G-000fcc-Hi@gemulon.postgresql.org> (raw)
Fix theoretical torn page hazard.
The original report was concerned with a possible inconsistency
between the heap and the visibility map, which I was unable to
confirm. The concern has been retracted.
However, there did seem to be a torn page hazard when using
checksums. By not setting the heap page LSN during redo, the
protections of minRecoveryPoint were bypassed. Fixed, along with a
misleading comment.
It may have been impossible to hit this problem in practice, because
it would require a page tear between the checksum and the flags, so I
am marking this as a theoretical risk. But, as discussed, it did
violate expectations about the page LSN, so it may have other
consequences.
Backpatch to all supported versions.
Reported-by: Konstantin Knizhnik
Reviewed-by: Konstantin Knizhnik
Discussion: https://postgr.es/m/fed17dac-8cb8-4f5b-d462-1bb4908c029e@garret.ru
Backpatch-through: 11
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d6a3dbe14f98d867b2fc3faeb99d2d3c2a48ca67
Modified Files
--------------
src/backend/access/heap/heapam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org
Subject: Re: pgsql: Fix theoretical torn page hazard.
In-Reply-To: <E1otb0G-000fcc-Hi@gemulon.postgresql.org>
References: <E1otb0G-000fcc-Hi@gemulon.postgresql.org>
* 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