pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Refrain from duplicating data in reorderbuffers
Date: Tue, 06 Mar 2018 21:35:39 +0000
Message-ID: <E1etKFH-0003kv-NH@gemulon.postgresql.org> (raw)

Refrain from duplicating data in reorderbuffers

If a walsender exits leaving data in reorderbuffers, the next walsender
that tries to decode the same transaction would append its decoded data
in the same spill files without truncating it first, which effectively
duplicate the data.  Avoid that by removing any leftover reorderbuffer
spill files when a walsender starts.

Backpatch to 9.4; this bug has been there from the very beginning of
logical decoding.

Author: Craig Ringer, revised by me
Reviewed by: Álvaro Herrera, Petr Jelínek, Masahiko Sawada

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d4429d50a21adcc0543701350d5112e3868a3596

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 137 ++++++++++++++----------
1 file changed, 82 insertions(+), 55 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1etKFH-0003kv-NH@gemulon.postgresql.org>
Permalink:  ../E1etKFH-0003kv-NH@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1etKFH-0003kv-NH@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: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Refrain from duplicating data in reorderbuffers
  In-Reply-To: <E1etKFH-0003kv-NH@gemulon.postgresql.org>
  References: <E1etKFH-0003kv-NH@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