pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix initial sync of slot parent directory when restoring status
Date: Sun, 02 Sep 2018 19:42:32 +0000
Message-ID: <E1fwYGW-0001Ya-Kf@gemulon.postgresql.org> (raw)

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-

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/504f059f5a198cff558e1c95a55aa63e03e2c3a8

Modified Files
--------------
src/backend/replication/slot.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1fwYGW-0001Ya-Kf@gemulon.postgresql.org>
Permalink:  ../E1fwYGW-0001Ya-Kf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fwYGW-0001Ya-Kf@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix initial sync of slot parent directory when restoring status
  In-Reply-To: <E1fwYGW-0001Ya-Kf@gemulon.postgresql.org>
  References: <E1fwYGW-0001Ya-Kf@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox