pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix leaking of small spilled subtransactions during logical deco
Date: Mon, 19 Jun 2017 02:30:11 +0000
Message-ID: <E1dMmSB-0000JI-83@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix leaking of small spilled subtransactions during logical decoding.

When, during logical decoding, a transaction gets too big, it's
contents get spilled to disk. Not just the top-transaction gets
spilled, but *also* all of its subtransactions, even if they're not
that large themselves.  Unfortunately we didn't clean up
such small spilled subtransactions from disk.

Fix that, by keeping better track of whether a transaction has been
spilled to disk.

Author: Andres Freund
Reported-By: Dmitriy Sarafannikov, Fabrízio de Royes Mello
Discussion:
    https://postgr.es/m/1457621358.355011041@f382.i.mail.ru
    https://postgr.es/m/CAFcNs+qNMhNYii4nxpO6gqsndiyxNDYV0S=JNq0v_sEE+9PHXg@mail.gmail.com
Backpatch: 9.4-, where logical decoding was introduced

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3bdea167eb01491a4898e977d308508374e97bfa

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 7 ++++---
src/include/replication/reorderbuffer.h         | 9 +++++++++
2 files changed, 13 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (4+ messages)  latest in thread

Message-ID: <E1dMmSB-0000JI-83@gemulon.postgresql.org>
Permalink:  ../E1dMmSB-0000JI-83@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dMmSB-0000JI-83@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: andres@anarazel.de
  Subject: Re: pgsql: Fix leaking of small spilled subtransactions during logical deco
  In-Reply-To: <E1dMmSB-0000JI-83@gemulon.postgresql.org>
  References: <E1dMmSB-0000JI-83@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