Re: logical replication, with a replication slot but still getting "requested WAL segment has already been removed"

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Sbob <sbob(at)quadratum-braccas(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: logical replication, with a replication slot but still getting "requested WAL segment has already been removed"
Date: 2025-12-23 10:17:15
Message-ID: d84d9729b07ae61edc66ee58c2c413f0b8ecc37b.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 2025-12-22 at 14:14 -0700, Sbob wrote:
> We have setup logical replication for some very large tables, both publisher and subscriber
> are running postgresql v14, however even though the locical replication is using a replication
> slot we keep getting this error:
>
>  2025-12-21 23:25:50.452 UTC [2131314] LOG:  logical replication apply worker for subscription "bigtables_sub" has started
>  2025-12-21 23:25:50.987 UTC [2131314] ERROR:  could not receive data from WAL stream: ERROR:  requested WAL segment 000000020000089F00000098 has already been removed

Look into "pg_replication_slots" on the publisher, perhaps the "wal_status" has changed
to "unreserved" or "lost". One possible cause for that could be the setting of
"max_slot_wal_keep_size" on the publisher.

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Teju Jakkidi 2025-12-29 21:46:21 Unable to install pgbouncer-1.25.x on SUSE without errors
Previous Message Sbob 2025-12-22 21:14:39 logical replication, with a replication slot but still getting "requested WAL segment has already been removed"