postgresql/src
Michael Paquier caa0c6ceba Fix initial sync of slot parent directory when restoring status
At the beginning of recovery, information from replication slots is
recovered from disk to memory.  In order to ensure the durability of the
information, the status file as well as its parent directory are
synced.  It happens that the sync on the parent directory was done
directly using the status file path, which is logically incorrect, and
the current code has been doing a sync on the same object twice in a
row.

Reported-by: Konstantin Knizhnik
Diagnosed-by: Konstantin Knizhnik
Author: Michael Paquier
Discussion: https://postgr.es/m/9eb1a6d5-b66f-2640-598d-c5ea46b8f68a@postgrespro.ru
Backpatch-through: 9.4-
2018-09-02 12:40:30 -07:00
..
backend Fix initial sync of slot parent directory when restoring status 2018-09-02 12:40:30 -07:00
bin Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
common Require a C99-compliant snprintf(), and remove related workarounds. 2018-08-16 13:01:09 -04:00
fe_utils Fix lexing of standard multi-character operators in edge cases. 2018-08-23 21:42:40 +01:00
include Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
interfaces Fix lexing of standard multi-character operators in edge cases. 2018-08-23 21:42:40 +01:00
makefiles Include contrib modules in the temp installation even without REGRESS. 2018-08-28 17:26:09 -04:00
pl Fix snapshot leak warning for some procedures 2018-08-27 22:16:15 +02:00
port Clean up assorted misuses of snprintf()'s result value. 2018-08-15 16:29:31 -04:00
template Force "restrict" not to be used when compiling with xlc. 2017-10-13 12:15:06 -07:00
test Implement "pg_ctl logrotate" command 2018-09-01 19:46:49 +03:00
timezone Update time zone data files to tzdata release 2018e. 2018-05-09 13:56:22 -04:00
tools Require C99 (and thus MSCV 2013 upwards). 2018-08-23 18:33:57 -07:00
tutorial Deduplicate "invalid input syntax" messages for various types. 2018-07-22 14:58:01 -07:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Ensure we build generated headers at the start of some more cases. 2018-07-30 18:04:39 -04:00
Makefile.shlib Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00