postgresql/src/backend/access
Jeff Davis d6a3dbe14f 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
2022-11-11 12:38:29 -08:00
..
brin Rename shadowed local variables 2022-10-05 21:01:41 +13:00
common Report a more useful error for reloptions on a partitioned table. 2022-11-09 12:28:34 -05:00
gin Fix ordering issue with WAL operations in GIN fast insert path 2022-10-13 09:31:57 +09:00
gist Remove unnecessary uses of Abs() 2022-10-07 13:29:33 +02:00
hash meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
heap Fix theoretical torn page hazard. 2022-11-11 12:38:29 -08:00
index meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
nbtree Remove AssertArg and AssertState 2022-10-28 09:19:06 +02:00
rmgrdesc Improve the description of XLOG_RUNNING_XACTS. 2022-11-02 10:06:55 +05:30
spgist meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
table meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
tablesample meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
transam Fix comment of SimpleLruInit() in slru.c 2022-11-10 16:32:29 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00