pgsql: Recursively fsync() the data directory after a crash. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Recursively fsync() the data directory after a crash.
Date
Msg-id E1YpL1A-0007U3-BR@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Recursively fsync() the data directory after a crash.

Otherwise, if there's another crash, some writes from after the first
crash might make it to disk while writes from before the crash fail
to make it to disk.  This could lead to data corruption.

Back-patch to all supported versions.

Abhijit Menon-Sen, reviewed by Andres Freund and slightly revised
by me.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/14de825dee324cb6b1e8298ee845e1134edcc33e

Modified Files
--------------
src/backend/access/transam/xlog.c |   42 ++++++++++++++
src/backend/storage/file/fd.c     |  115 +++++++++++++++++++++++++++++++++++++
src/include/storage/fd.h          |    2 +
3 files changed, 159 insertions(+)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Recursively fsync() the data directory after a crash.
Next
From: Robert Haas
Date:
Subject: pgsql: Recursively fsync() the data directory after a crash.