Re: Logical replication ApplyContext bloat

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Cc: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical replication ApplyContext bloat
Date: 2017-04-19 10:34:55
Message-ID: CANP8+jJrSdOfijzPyrKvXYGqr-7LovHyTW7BpD1=pam9sMdtwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19 April 2017 at 11:24, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com> wrote:

> I'd still like you to add comment to the ApplyContext saying that it's
> cleaned after handling each message so nothing that needs to survive for
> example whole transaction can be allocated in it as that's not very well
> visible IMHO (and I know I will forget about it when writing next patch
> in that area).

It would be better to invent the contexts we want now, so we get the
architecture right for future work. Otherwise we have problems with
"can't backpatch this fix because that infrastructure doesn't exist in
PG10" in a couple of years.

So I suggest we have

ApplyMessageContext - cleaned after every message
ApplyTransactionContext - cleaned at EOXact
ApplyContext - persistent

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stas Kelvich 2017-04-19 10:46:07 Re: Logical replication ApplyContext bloat
Previous Message Petr Jelinek 2017-04-19 10:24:46 Re: Logical replication ApplyContext bloat