pgsql: Improve memory use in logical replication apply

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve memory use in logical replication apply
Date: 2017-05-09 18:52:16
Message-ID: E1d8AF6-0003SG-QE@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve memory use in logical replication apply

Previously, the memory used by the logical replication apply worker for
processing messages would never be freed, so that could end up using a
lot of memory. To improve that, change the existing ApplyContext memory
context to ApplyMessageContext and reset that after every
message (similar to MessageContext used elsewhere). For consistency of
naming, rename the ApplyCacheContext to ApplyContext.

Author: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/489b96e80b96c0eda02575347654e87968f2f5f4

Modified Files
--------------
src/backend/replication/logical/worker.c | 51 ++++++++++++++++---------------
src/backend/utils/mmgr/README | 11 +++++++
src/include/replication/worker_internal.h | 4 +--
3 files changed, 40 insertions(+), 26 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message pgsql 2017-05-09 21:48:41 pgsql: Tag refs/tags/REL9_6_3 was created
Previous Message Alvaro Herrera 2017-05-09 18:00:41 pgsql: Ignore PQcancel errors properly