Обсуждение: logical replication, with a replication slot but still getting "requested WAL segment has already been removed"

Поиск
Список
Период
Сортировка

All;

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

Thanks for any help

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
000000020000089F00000098has 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