Re: Patroni, slots, and expiring WALs

Поиск
Список
Период
Сортировка
От Alexander Kukushkin
Тема Re: Patroni, slots, and expiring WALs
Дата
Msg-id CAFh8B=nf_Xgc-YaLE3vo=T6c9OqcnMJNa-stMh8R_jofeopidQ@mail.gmail.com
обсуждение исходный текст
Ответ на Patroni, slots, and expiring WALs  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Ответы Re: Patroni, slots, and expiring WALs  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
Hi,


On Tue, 28 Mar 2023 at 16:55, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:

However, when we took down one node for about two hours for some tests
recently (with some moderate traffic on the remaining node), the replica
didn't catch up after being restarted and inspection of the logs showed
that it was trying to get WALs which had already been deleted.


It is impossible to know whether it is down temporarily or gone forever, therefore the slot is removed as soon as the member key expires (after TTL).
 
So apparently, `use_slots: true` isn't enough. What else do I have to
configure? (I know about wal_keep_size, but it was my understanding that
this isn't needed when slots are used)

The best option is to configure continuous archiving and PITR. Backups are always important.
The second option - you can put all member names into permanent slots configuration (using patronictl edit-config):
slots:
  nodename1:
    type: physical
  nodename2:
    type: physical
  nodename3:
    type: physical

This way slots representing these members will not be removed.

Regards,
--
Alexander Kukushkin

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Cluster table based on grand parent?
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Patroni, slots, and expiring WALs