Обсуждение: pgsql: Recursively fsync() the data directory after a crash.

Поиск
Список
Период
Сортировка

pgsql: Recursively fsync() the data directory after a crash.

От
Robert Haas
Дата:
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_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/30ba0d0c21a825bc9c0565ea331be98068536b0e

Modified Files
--------------
src/backend/access/transam/xlog.c |   41 +++++++++++++
src/backend/storage/file/fd.c     |  115 +++++++++++++++++++++++++++++++++++++
src/backend/utils/misc/guc.c      |    2 +-
src/include/storage/fd.h          |    2 +
src/include/utils/guc.h           |    1 +
5 files changed, 160 insertions(+), 1 deletion(-)