]> granicus.if.org Git - postgresql/commit
Fix leaking of small spilled subtransactions during logical decoding.
authorAndres Freund <andres@anarazel.de>
Mon, 19 Jun 2017 01:48:22 +0000 (18:48 -0700)
committerAndres Freund <andres@anarazel.de>
Mon, 19 Jun 2017 02:12:56 +0000 (19:12 -0700)
commit3bdea167eb01491a4898e977d308508374e97bfa
tree8f1f4b527fca3c36448c11903c20540fb560526b
parentb4166a8df914f56b3b7d2dc1b74897e7525c5cea
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
src/backend/replication/logical/reorderbuffer.c
src/include/replication/reorderbuffer.h