Intermittent Issue with WAL Segment Removal in Logical Replication

Поиск
Список
Период
Сортировка
От Kaushik Iska
Тема Intermittent Issue with WAL Segment Removal in Logical Replication
Дата
Msg-id CAHYLuVkH4nWohHyMBam2wQi0XT0NN5FJdTWjb+sS--YCkDWofA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Intermittent Issue with WAL Segment Removal in Logical Replication
Список pgsql-general

Dear PostgreSQL Community,

I am seeking guidance regarding a recurring issue we've encountered with WAL segment removal during logical replication using pgoutput plugin. We sporadically encounter an error indicating that a requested WAL segment has already been removed. This issue arises intermittently when executing START_REPLICATION. An example error message is as follows:

requested WAL segment 000000010000146000000AE has already been removed

Please note that this error is not specific to the segment mentioned above; it serves as an example of the type of error we are experiencing.

Additional Context:

  • max_slot_wal_keep_size is -1, logical_decoding_work_mem is 4 GB.

  • The error seems to appear randomly and is not consistent.

  • After a couple of retries, the replication process eventually succeeds.

  • For one of the users it seems to be happening every 16 hours or so.


Our approach involves starting with START_REPLICATION 0, replicating data in batches, and then restarting at the last LSN of the previous batch. We are trying to understand the root cause behind the intermittent removal of WAL segments during logical replication. Specifically, we are looking for insights into:

  • The potential reasons for the WAL segments being reported as removed.

  • Why this error occurs intermittently and why replication succeeds after several retries.

  • Any advice on troubleshooting and resolving this issue, or insights into whether it might be related to our specific replication setup or a characteristic of pgoutput, would be highly valuable.


Related Posts


Thank you very much for your time and assistance.

Thanks,

Kaushik Iska

В списке pgsql-general по дате отправления:

Предыдущее
От: Laurence Parry
Дата:
Сообщение: Logical replication stall on box type with REPLICA IDENTITY FULL due to lack of exact equality
Следующее
От: Clemens Eisserer
Дата:
Сообщение: Re: Query crash with 15.5 on debian bookworm/armv8