Re: BUG #15346: Replica fails to start after the crash

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15346: Replica fails to start after the crash
Дата
Msg-id 20180828125945.GG29157@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #15346: Replica fails to start after the crash  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: BUG #15346: Replica fails to start after the crash  (Alexander Kukushkin <cyberdemn@gmail.com>)
Список pgsql-bugs
On Tue, Aug 28, 2018 at 08:23:11AM -0400, Stephen Frost wrote:
> * Andres Freund (andres@anarazel.de) wrote:
>> Uh, where is that "control file last" bit coming from?
>
> pg_basebackup copies it last.  The comments should probably be improved
> as to *why* but my recollection is that it's, at least in part, to
> ensure the new cluster can't be used until it's actually a complete
> backup.

What we have now is mainly in basebackup.c.  See 8366c780 which
introduced that.  Stephen has that right, as we cannot rely on an
end-backup record when taking a backup from a standby, copying the
control file last ensures that the consistent point should be late
enough that no other pages are inconsistent.  Even with that, I think
that there is still a small race condition but I cannot put my finger on
it now.  I agree that the current comments do a bad job as to why this
happens.  That's actually something I discovered when discussing what
has resulted in f267c1c2.
--
Michael

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15356: Inconsistent documentation about CREATE TYPE
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list"