summaryrefslogtreecommitdiff
path: root/src/common/file_utils.c
AgeCommit message (Collapse)Author
2017-03-22Sync pg_dump and pg_dumpall outputAndrew Dunstan
Before exiting any files are fsync'ed. A --no-sync option is also provided for a faster exit if desired. Michael Paquier. Reviewed by Albe Laurenz Discussion: https://postgr.es/m/CAB7nPqS1uZ=Ov+UruW6jr3vB-S_DLVMPc0dQpV-fTDjmm0ZQMg@mail.gmail.com
2017-01-03Update copyright via script for 2017Bruce Momjian
2016-10-20Rename "pg_xlog" directory to "pg_wal".Robert Haas
"xlog" is not a particularly clear abbreviation for "write-ahead log", and it sometimes confuses users into believe that the contents of the "pg_xlog" directory are not critical data, leading to unpleasant consequences. So, rename the directory to "pg_wal". This patch modifies pg_upgrade and pg_basebackup to understand both the old and new directory layouts; the former is necessary given the purpose of the tool, while the latter merely avoids an unnecessary backward-compatibility break. We may wish to consider renaming other programs, switches, and functions which still use the old "xlog" naming to also refer to "wal". However, that's still under discussion, so let's do just this much for now. Discussion: CAB7nPqTeC-8+zux8_-4ZD46V7YPwooeFxgndfsq5Rg8ibLVm1A@mail.gmail.com Michael Paquier
2016-10-02Avoid leaking FDs after an fsync failure.Tom Lane
Fixes errors introduced in commit bc34223bc, as detected by Coverity. In passing, report ENOSPC for a short write while padding a new wal file in open_walfile, make certain that close_walfile closes walfile in all cases, and improve a couple of comments. Michael Paquier and Tom Lane
2016-09-29Fix compiler warningsPeter Eisentraut
This was missed in bf5bb2e85b6492c7245b9446efaf43d52a98db13, because the code is only visible under PG_FLUSH_DATA_WORKS.
2016-09-29pg_basebackup pg_receivexlog: Issue fsync more carefullyPeter Eisentraut
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>
2016-09-29Move fsync routines of initdb into src/common/Peter Eisentraut
The intention is to used those in other utilities such as pg_basebackup and pg_receivexlog. From: Michael Paquier <michael.paquier@gmail.com>