Re: Online base backup from the hot-standby

Поиск
Список
Период
Сортировка
От Jun Ishiduka
Тема Re: Online base backup from the hot-standby
Дата
Msg-id 201108180548.p7I5m0Xx013962@ccmds32.silk.ntts.co.jp
обсуждение исходный текст
Ответ на Re: Online base backup from the hot-standby  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Online base backup from the hot-standby  (Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>)
Список pgsql-hackers
> > * Procedure
> >
> > 1. Call pg_start_backup('x') on the standby.
> > 2. Take a backup of the data dir.
> > 3. Call pg_stop_backup() on the standby.
> > 4. Copy the control file on the standby to the backup.
> > 5. Check whether the control file is status during hot standby with pg_controldata.
> > ? -> If the standby promote between 3. and 4., the backup can not recovery.
> > ? ? ?-> pg_control is that "Minimum recovery ending location" is equals 0/0.
> > ? ? ?-> backup-end record is not written.
> 
> What if we do #4 before #3? The backup gets corrupted? My guess is
> that the backup is still valid even if we copy pg_control before executing
> pg_stop_backup(). Which would not require #5 because if the standby
> promotion happens before pg_stop_backup(), pg_stop_backup() can
> detect that status change and cancel the backup.
> 
> #5 looks fragile. If we can get rid of it, the procedure becomes more
> robust, I think.

Sure, you're right.

--------------------------------------------
Jun Ishizuka
NTT Software Corporation
TEL:045-317-7018
E-Mail: ishizuka.jun@po.ntts.co.jp
--------------------------------------------




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

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: Re: Allowing same cursor name in nested levels
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Displaying accumulated autovacuum cost