Re: WAL files keep piling up

Поиск
Список
Период
Сортировка
От Zbigniew Kostrzewa
Тема Re: WAL files keep piling up
Дата
Msg-id CA+VG59H_p_ZD0Mrac+B8Q30fCwSZc898RE-5o303YJnOKfX_Dw@mail.gmail.com
обсуждение исходный текст
Список pgsql-performance
I have a PostgreSQL (9.6.15) two node cluster setup with Patroni. The instances are configured to work in master <-> synchronous standby setup and both run in docker containers with pgdata volume mounted from host. When master is restarted the synchronous standby automatically takes the role of master and master starts operating as synchronous replica.

So it seems that Patroni starts Postgres in two phases. First it starts both instances in standby mode and then, once it establishes who is the leader, it promotes one of the instances. It seems that when promoting a standby to a leader a new timeline is created which causes new WAL file to be created in pg_xlog/. In a result each restart results in a new timeline and a new WAL file. However, nothing cleans up the WAL files stamped with previous timelines. Is there a way to figure out which WAL files can be safely removed?

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

Предыдущее
От: Marc Millas
Дата:
Сообщение: Re: 9.6 write time
Следующее
От: Steve Nixon
Дата:
Сообщение: VACUUM: Nonremovable rows due to wal sender process