Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding - Mailing list pgsql-hackers

From Ajin Cherian
Subject Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding
Date
Msg-id CAFPTHDbnc1B6XGrnQEvuG-psxO_T8yJwMwjniLBAK-N-SZHmnA@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding  (Ajin Cherian <itsajin@gmail.com>)
Responses Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding
List pgsql-hackers
On Mon, Mar 3, 2025 at 9:10 PM Ajin Cherian <itsajin@gmail.com> wrote:
>
> On Thu, Feb 20, 2025 at 8:42 PM Hayato Kuroda (Fujitsu)
> <kuroda.hayato@fujitsu.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

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Add an option to skip loading missing publication to avoid logical replication failure
Next
From: "David G. Johnston"
Date:
Subject: DOCS: Make the Server Application docs synopses more consistent