Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine - Mailing list pgsql-bugs

From Thadeus Anand
Subject Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Date
Msg-id CANUywMEYYtipeXj0xYh5jVzq0THkfY0sqRMH+SSGw29=+UU5XA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine  (Amit Kapila <amit.kapila16@gmail.com>)
List 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.kapila16@gmail.com> wrote:
On Sun, Aug 24, 2025 at 3:14 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference:      19029
> Logged by:          Thadeus Anand
> Email address:      thadeus@rmkv.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.

pgsql-bugs by date:

Previous
From: Amit Kapila
Date:
Subject: Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Next
From: Amit Kapila
Date:
Subject: Re: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine