postgresql/src/backend/storage
Robert Haas 1ce14b6b2f Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.
If TRUNCATE causes some buffers to be invalidated and thus the
checkpoint does not flush them, TRUNCATE must also ensure that the
corresponding files are truncated on disk. Otherwise, a replay
from the checkpoint might find that the buffers exist but have
the wrong contents, which may cause replay to fail.

Report by Teja Mupparti. Patch by Kyotaro Horiguchi, per a design
suggestion from Heikki Linnakangas, with some changes to the
comments by me. Review of this and a prior patch that approached
the issue differently by Heikki Linnakangas, Andres Freund, Álvaro
Herrera, Masahiko Sawada, and Tom Lane.

Discussion: http://postgr.es/m/BYAPR06MB6373BF50B469CA393C614257ABF00@BYAPR06MB6373.namprd06.prod.outlook.com
2022-03-24 14:36:06 -04:00
..
buffer Fix possible recovery trouble if TRUNCATE overlaps a checkpoint. 2022-03-24 14:36:06 -04:00
file Fix concurrency issues with WAL segment recycling on Windows 2021-03-22 14:02:36 +09:00
freespace Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
ipc Fix possible recovery trouble if TRUNCATE overlaps a checkpoint. 2022-03-24 14:36:06 -04:00
large_object Fix snapshot reference leak if lo_export fails. 2021-11-03 10:54:36 +02:00
lmgr Fix possible recovery trouble if TRUNCATE overlaps a checkpoint. 2022-03-24 14:36:06 -04:00
page Extend PageIsVerified() to handle more custom options 2020-11-02 10:41:23 +09:00
smgr Check for relation length overrun soon enough. 2021-09-09 11:45:48 -04:00
sync Fix race between DROP TABLESPACE and checkpointing. 2022-03-16 17:21:19 +13:00
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00