Re: PostgreSQL logical replication depends on WAL segments?

Поиск
Список
Период
Сортировка
От Jeremy Finzel
Тема Re: PostgreSQL logical replication depends on WAL segments?
Дата
Msg-id CAMa1XUgA0-saNbbGoshLj7uRumdv6-93V4nwZLXbQETtTObyJA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PostgreSQL logical replication depends on WAL segments?  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: PostgreSQL logical replication depends on WAL segments?  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-general

wal retention in pg_wal and wal archiving are different things. The OP got problems cause he deliberately went on to delete files in pg_wal which means he used the wrong method to address a wrong situation.

However, if the OP has still those WAL files archived he can use them to bring logical replication back in synch. Don't ask me how I know : https://www.postgresql.org/message-id/ae8812c3-d138-73b7-537a-a273e15ef6e1%40matrix.gatewaynet.com

I don't think we are disagreeing.  My point is that WAL will be retained in pg_wal if it is still needed by a replication slot, and any one of those WAL files will not be archived and recycled as long as it no longer needed by a replication slot.  So yes, they are different things, but they are related in that sense.

It sounded to me like he had an old slot in place pointing to old WAL files, which the cron job removed, thus leading to his error.

Sure, he can recover from this by moving those WAL files back into pg_wal.  But my point is simply that he should rely on WAL archiving rather than archiving via cron because Postgres handles knowing whether or not a replication slot still needs a WAL file.

Thanks,
Jeremy

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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: PostgreSQL logical replication depends on WAL segments?
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Re: PostgreSQL logical replication depends on WAL segments?