pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix theoretical torn page hazard.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix theoretical torn page hazard.
@ 2022-11-11 20:51  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2022-11-11 20:51 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix theoretical torn page hazard.
@ 2022-11-11 20:52  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2022-11-11 20:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7bf713dd2d0739fbcd4103971ed69c17ebe677ea

Modified Files
--------------
src/backend/access/heap/heapam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix theoretical torn page hazard.
@ 2022-11-11 20:52  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2022-11-11 20:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f893af496100737b7fa1ef861ac8bd2705b4d5f1

Modified Files
--------------
src/backend/access/heap/heapam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix theoretical torn page hazard.
@ 2022-11-11 20:53  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2022-11-11 20:53 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/58a45bb1d82b90e33a45b646717bf6a035256ded

Modified Files
--------------
src/backend/access/heap/heapam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix theoretical torn page hazard.
@ 2022-11-11 20:53  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2022-11-11 20:53 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7dd39e9e80288f2f4ef2990c4f074010973b56cb

Modified Files
--------------
src/backend/access/heap/heapam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix theoretical torn page hazard.
@ 2022-11-11 20:53  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Jeff Davis @ 2022-11-11 20:53 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5eaf3e375dc77a254efa098bdb1413bbd0ef9f1a

Modified Files
--------------
src/backend/access/heap/heapam.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2022-11-11 20:53 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 20:51 pgsql: Fix theoretical torn page hazard. Jeff Davis <jdavis@postgresql.org>
2022-11-11 20:52 pgsql: Fix theoretical torn page hazard. Jeff Davis <jdavis@postgresql.org>
2022-11-11 20:52 pgsql: Fix theoretical torn page hazard. Jeff Davis <jdavis@postgresql.org>
2022-11-11 20:53 pgsql: Fix theoretical torn page hazard. Jeff Davis <jdavis@postgresql.org>
2022-11-11 20:53 pgsql: Fix theoretical torn page hazard. Jeff Davis <jdavis@postgresql.org>
2022-11-11 20:53 pgsql: Fix theoretical torn page hazard. Jeff Davis <jdavis@postgresql.org>

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