]> granicus.if.org Git - postgresql/commit
Fix initial sync of slot parent directory when restoring status
authorMichael Paquier <michael@paquier.xyz>
Sun, 2 Sep 2018 19:40:45 +0000 (12:40 -0700)
committerMichael Paquier <michael@paquier.xyz>
Sun, 2 Sep 2018 19:40:45 +0000 (12:40 -0700)
commit504f059f5a198cff558e1c95a55aa63e03e2c3a8
tree6036067c0438badaf8ef6fea0aa1801d55d943ec
parent9b0c58e6d43a75f6739e6b7d096f55dc32d27730
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-
src/backend/replication/slot.c