Re: pg_rewind and replication slots

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_rewind and replication slots
Дата
Msg-id 20180124023312.GD1355@paquier.xyz
обсуждение исходный текст
Ответ на pg_rewind and replication slots  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
On Tue, Jan 23, 2018 at 08:49:53PM +0100, Laurenz Albe wrote:
> When a primary with replication slots gets reset with pg_rewind,
> it keeps the replication slots.
>
> This does no harm per se, but when it gets promoted again,
> the replication slots are still there and are in the way.
> Won't they also hold back the xmin horizon?
>
> I think that pg_rewind should delete all replication slots.

Definitely agreed, but replications slots are not the only thing to
worry about. There has been a recent discussion on the matter:
https://www.postgresql.org/message-id/20180122201258.GT2416@tamriel.snowman.net

And the conclusion leads to the fact that we want the list of
directories and files that should be excluded from a base backup to
extracted into a header that pg_rewind could use for its own purpose as
it shares a lot in its logic with basebackup.c, and because using a
logic based on an exclusion list is more portable in the long run.

(I do remove pg_replslot's contents after running pg_rewind in my own
failover scripts by the way.)
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Handling better supported channel binding types for SSLimplementations
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] parallel.c oblivion of worker-startup failures