Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine

From: Thadeus Anand <thadeus(at)rmkv(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Date: 2025-08-25 05:09:19
Message-ID: CANUywMEYYtipeXj0xYh5jVzq0THkfY0sqRMH+SSGw29=+UU5XA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

The number of replication slots does not increase at all. But the size of
each folder keeps increasing simultaneously.

When I restart a subscriber, the size of the respective slot resets, then
immediately grows up to the size of the slots of other subscribers.

The table data is properly synchronized across the locations, and the
status of the replication remains as 'streaming'. So, effectively, the
logical replication works (which it wasn't in version 17.5), but the
replication slot isn't resetting.

Thadeus Anand.

On Mon, Aug 25, 2025 at 9:21 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Sun, Aug 24, 2025 at 3:14 AM PG Bug reporting form
> <noreply(at)postgresql(dot)org> wrote:
> >
> > The following bug has been logged on the website:
> >
> > Bug reference: 19029
> > Logged by: Thadeus Anand
> > Email address: thadeus(at)rmkv(dot)com
> > PostgreSQL version: 17.6
> > Operating system: Ubuntu 24.04.2
> > Description:
> >
> > We have seven servers distributed geographically. We publish about 62
> tables
> > through logical replication, with six subscribers. We were hugely
> affected
> > by the memory allocation bug after upgrading to 17.5. We had to suspend
> the
> > replication and resort to manually updating the tables.
> >
> > So we updated to 17.6 almost immediately. Now the logical replication
> works
> > perfectly, but we notice the replication slot folders increasing in size
> > quite dramatically, even when there is no lag found in the subscribers.
> >
>
> What do you mean by this? Do you mean that restart_lsn of logical
> slots is not moving forward or number of slots are growing in
> $PGDATA/pg_replslot or something else? Specifically, I want to know
> what do you mean by: 'but we notice the replication slot folders
> increasing in size'?
>
> --
> With Regards,
> Amit Kapila.
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2025-08-25 05:24:48 Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Previous Message Amit Kapila 2025-08-25 03:51:02 Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine