Re: For what should pg_stop_backup wait?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: For what should pg_stop_backup wait?
Дата
Msg-id 1218117588.4549.497.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на For what should pg_stop_backup wait?  ("Fujii Masao" <masao.fujii@gmail.com>)
Ответы Re: For what should pg_stop_backup wait?  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
On Thu, 2008-08-07 at 21:11 +0900, Fujii Masao wrote:

> In HEAD, pg_stop_backup waits until the history file has been archived.
> But, in order to ensure that the last wal file was archived, pg_stop_backup
> should wait until not only the history file but also the backup stopping wal
> file has been archived, I think.
> 
> Because the alphabetic order of the history file and the backup stopping
> wal file is not constant.

> If the backup starting wal file is the same as the stopping one (that is,
> any wal files were not switched during backup), the history file whose
> name consists of the starting one is behind the stopping one.
> Otherwise, the backup stopping wal file is behind the history file.

pg_stop_backup explicitly requests a log switch prior to writing the
history file, so this occurs in all cases. The assumption is wrong.

So yes, we should wait for stopxlogfilename, not histfilepath.

I'll do a patch. Thanks for your input.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Visibility Groups
Следующее
От: "Marko Kreen"
Дата:
Сообщение: [patch] fix dblink security hole