pgsql: pg_basebackup pg_receivexlog: Issue fsync more carefully - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: pg_basebackup pg_receivexlog: Issue fsync more carefully
Date
Msg-id E1bpdJu-0008W8-JT@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Don't bother to lock bufmgr partitions in pg_buffercache.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Switch pg_basebackup commands in Postgres.pm to use --nosync