Patroni, slots, and expiring WALs

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Patroni, slots, and expiring WALs
Дата
Msg-id 20230328145508.g6kl3sek6ycijvsg@hjp.at
обсуждение исходный текст
Ответы Re: Patroni, slots, and expiring WALs  (Jeremy Smith <jeremy@musicsmith.net>)
Re: Patroni, slots, and expiring WALs  (Alexander Kukushkin <cyberdemn@gmail.com>)
Список pgsql-general
I think I'm missing something basic here.

We have set up a postgresql cluster with Patroni (3.0.1-1.pgdg22.04+1)
and PostgreSQL (15+248.pgdg22.04+1) from the PGDG repo fur Ubuntu.

The patroni configuration was created via the pg_createconfig_patroni
script, basically using all the defaults.

The configuration includes `use_slots: true` and I can see a slot in
pg_replication_slots on the leader.

I was under the impression that this would be sufficient to prevent WALs
from being deleted on the leader before they are used on the replica.

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.

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)

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Cluster table based on grand parent?
Следующее
От: Jeremy Smith
Дата:
Сообщение: Re: Patroni, slots, and expiring WALs