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_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/2bc3397168580a28a1f072bec46d395f4eb54c08 Modified Files -------------- src/backend/access/transam/xlog.c | 41 +++++++++++++ src/backend/storage/file/fd.c | 115 +++++++++++++++++++++++++++++++++++++ src/include/storage/fd.h | 2 + 3 files changed, 158 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers