Thread: pgsql: pg_basebackup pg_receivexlog: Issue fsync more carefully

pgsql: pg_basebackup pg_receivexlog: Issue fsync more carefully

From
Peter Eisentraut
Date:
pg_basebackup pg_receivexlog: Issue fsync more carefully

Several places weren't careful about fsyncing in the way.  See 1d4a0ab1
and 606e0f98 for details about required fsyncs.

This adds a couple of functions in src/common/ that have an equivalent
in the backend: durable_rename(), fsync_parent_path()

From: Michael Paquier <michael.paquier@gmail.com>

Branch
------
master

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

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c |  27 +++++++++
src/bin/pg_basebackup/receivelog.c    |  52 ++++++++++-------
src/common/file_utils.c               | 105 ++++++++++++++++++++++++++++++++--
src/include/common/file_utils.h       |   7 ++-
4 files changed, 162 insertions(+), 29 deletions(-)