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.
caa0c6ceba Fix initial sync of slot parent directory when restoring status
src/backend/replication/slot.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)