Re: Re: BUG #5602: Recovering from Hot-Standby file backup leads to the currupted indexes

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Re: BUG #5602: Recovering from Hot-Standby file backup leads to the currupted indexes
Дата
Msg-id AANLkTimu3N0shF2_Q2p9h-cajZFmQEW0twbtK=tn2gP3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Re: BUG #5602: Recovering from Hot-Standby file backup leads to the currupted indexes  (Valentine Gogichashvili <valgog@gmail.com>)
Ответы Re: Re: BUG #5602: Recovering from Hot-Standby file backup leads to the currupted indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Thu, Aug 12, 2010 at 5:33 PM, Valentine Gogichashvili
<valgog@gmail.com> wrote:
> Hi,
> Actually full_page_write being turned off on the master is probably a
> problem.

Yep. As Simon suggests, we must run pg_start_backup on the master,
to take a backup from the standby safely even if full_page_writes
is disabled. So we should:

(based on Simon's suggestion)
1. run pg_start_backup() on master.
2. copy backup_label from master to temporary area.
   copying backup_label directly to standby would generate another
   weakness (e.g., what if standby is restarted while backup_label
   exists in standby?), so backup_label should be copied to elsewhere
   than standby.
3. wait for "Latest checkpoint's REDO location" which pg_controldata
   on standby returns, to reach or exceed "START WAL LOCATION" in
   backup_label copied in the step 2. This would take long, but we
   can run checkpoint on standby to shorten waiting time.
4. run backup on standby
5. run pg_stop_backup() on master
6. copy backup_label from temporary are to backup

Is this procedure still unsafe?

I'm thinking that it's worth leaving the current documented procedure
since it has less impact on the master, if we write clearly that the
procedure is safe only when full_page_writes is enabled. Comments?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5611: SQL Function STABLE promoting to VOLATILE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5611: SQL Function STABLE promoting to VOLATILE