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-0003kp-N8@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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8aa75e1384b1c62e302db02e6006fc6a2885afeb
Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 138 ++++++++++++++----------
1 file changed, 82 insertions(+), 56 deletions(-)
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-0003kp-N8@gemulon.postgresql.org>
References: <E1etKFH-0003kp-N8@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