Re: BUG #14109: pg_rewind fails to update target control file in one scenario

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #14109: pg_rewind fails to update target control file in one scenario
Дата
Msg-id CAB7nPqTKy-q1CYxJ9sX9bK-A4uqW=BkKD_nxxAK1tb07mgtuzQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14109: pg_rewind fails to update target control file in one scenario  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: BUG #14109: pg_rewind fails to update target control file in one scenario  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
On Thu, Apr 28, 2016 at 8:28 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Michael Paquier wrote:
>> On Wed, Apr 27, 2016 at 9:47 AM, Michael Paquier
>> <michael.paquier@gmail.com> wrote:
>
>> > Replication slots are perfectly able to retain WAL segments from a
>> > prior timeline, so I am not sure that this would be much a gain.
>>
>> Or to put in in other words, a slot that activates automatically
>> itself at promotion to retain WAL from the previous timeline would be
>> interesting for pg_rewind, but the use case we have here is only
>> pg_rewind. so it seems a bit narrow to bother modifying the core core
>> to add this support in the replication slot code. And this can be
>> solved lightly with an archive. Thoughts from others are welcome.
>
> Sounds to me like it should be enough to document (in pg_rewind's page)
> that activating a slot prior to the promotion. Maybe we could have
> "pg_ctl promote" have an option to create a slot, to make this simpler?

That would be actually creating a slot before the last common
checkpoint before promotion, which is a bit more tricky to evaluate.
With luck, perhaps both of them would be on the same segment, but
there is no way to be sure about that... It seems to me that what we
are looking for here is a way to tell through
pg_create_physical_replication_slot to reserve WAL from a position
that caller has decided.
--
Michael

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: streaming replication master can fail to shut down
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #14109: pg_rewind fails to update target control file in one scenario