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

From: Ajin Cherian <itsajin(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(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-03-13 02:13:00
Message-ID: CAFPTHDbnc1B6XGrnQEvuG-psxO_T8yJwMwjniLBAK-N-SZHmnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 3, 2025 at 9:10 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
> On Thu, Feb 20, 2025 at 8:42 PM Hayato Kuroda (Fujitsu)
> <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> >

I confirmed with tests that with the patch, a lot less disk space is
used when there are lots of unpublished changes and the subscription
is not configured to be streaming.
HEAD code:
Initial disk usage in replication slot directory:
4.0K /home/ajin/dataoss/pg_replslot/mysub
BEGIN
INSERT 0 1000000
COMMIT
Final disk usage in replication slot directory:
212M /home/ajin/dataoss/pg_replslot/mysub

Patched code:
Initial disk usage in replication slot directory:
4.0K /home/ajin/dataoss/pg_replslot/mysub
BEGIN
INSERT 0 1000000
COMMIT
Final disk usage in replication slot directory:
4.0K /home/ajin/dataoss/pg_replslot/mysub

Attaching the test script used.

Regards,
Ajin Cherian
Fujitsu Australia

Attachment Content-Type Size
test_disk_usage.sh application/octet-stream 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-03-13 02:51:02 DOCS: Make the Server Application docs synopses more consistent
Previous Message vignesh C 2025-03-13 02:08:16 Re: Add an option to skip loading missing publication to avoid logical replication failure