Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Ajin Cherian <itsajin(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding
Date: 2025-06-03 05:54:56
Message-ID: CAA4eK1KYhBHj5pCsTXvSJRyBOQ9oi=j1X=FeTg7c8cBMYWUscw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 30, 2025 at 4:41 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
> I ran a series of tests using both streaming and non-streaming logical
> replication modes with the patch. In non-streaming mode, the patch
> showed a significant performance improvement — up to +68% in the best
> case, with a -6% regression in the worst case.
>
> In contrast, results in streaming mode were more modest. With the
> default logical_decoding_work_mem of 64MB, I observed a +11.6%
> improvement at best and a -6.7% degradation at worst. Increasing the
> work memory provided some incremental improvements:
>
> At 128MB: +14.43% (best), -0.65% (worst)
>
> At 256MB: +12.55% (best), -0.03% (worst)
>
> At 512MB: +16.98% (best), -2.48% (worst)
>
> It's worth noting that streaming mode is enabled by default in logical
> decoding, and as such, it's likely the mode most users and
> applications are operating in. Non-streaming mode is typically only
> used in more specialized setups or older deployments. Given this, the
> broader benefit of the patch - especially considering its complexity,
> may depend on how widely non-streaming mode is used in practice.
>

You haven't shared the exact test scenario, but I am assuming the
above tests are for very large transactions, as you are comparing
streaming and non-streaming modes. Can we see results with short
transaction size (say one insert or one update, or one delete) as
well?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2025-06-03 06:25:15 Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding
Previous Message Nisha Moond 2025-06-03 05:35:07 Re: Fix slot synchronization with two_phase decoding enabled