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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Recursively fsync() the data directory after a crash.
Дата
Msg-id E1YpL1A-0007U1-B6@gemulon.postgresql.org
обсуждение исходный текст
Список 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_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d8ac77ab178ddb2ae043b8c463cd30c031e793d0

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 по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix the same-rel optimization when creating WAL records.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Recursively fsync() the data directory after a crash.