Re: Online base backup from the hot-standby

Поиск
Список
Период
Сортировка
От Jun Ishiduka
Тема Re: Online base backup from the hot-standby
Дата
Msg-id 201110120245.p9C2jGQM031316@ccmds32.silk.ntts.co.jp
обсуждение исходный текст
Ответ на Re: Online base backup from the hot-standby  (Steve Singer <ssinger_pg@sympatico.ca>)
Ответы Re: Online base backup from the hot-standby  (Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>)
Список pgsql-hackers
> Some testing notes
> ------------------------------
> select pg_start_backup('x');
> ERROR: full_page_writes on master is set invalid at least once since
> latest checkpoint
> 
> I think this error should be rewritten as
> ERROR: full_page_writes on master has been off at some point since
> latest checkpoint
> 
> We should be using 'off' instead of 'invalid' since that is what is what
> the user sets it to.

Sure.


> I switched full_page_writes=on , on the master
> 
> did a pg_start_backup() on the slave1.
> 
> Then I switched full_page_writes=off on the master, did a reload +
> checkpoint.
> 
> I was able to then do my backup of slave1, copy the control file, and
> pg_stop_backup().
>
> When I did the test slave2 started okay, but is this safe? Do we need a
> warning from pg_stop_backup() that is printed if it is detected that
> full_page_writes was turned off on the master during the backup period?

I also reproduced.

pg_stop_backup() fails in most cases.
However, it succeeds if both the following cases are true. * checkpoint is done before walwriter recieves SIGHUP. *
slave1has not received the WAL of 'off' by SIGHUP yet.
 



> Minor typo above at 'CHECKPOTNT'

Yes.


> If my concern about full page writes being switched to off in the middle
> of a backup is unfounded then I think this patch is ready for a
> committer. They can clean the two editorial changes when they apply the
> patches.

Yes. I'll clean since these comments fix.


> If do_pg_stop_backup is going to need some logic to recheck the full
> page write status then an updated patch is required.

It already contains.


Regards.

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




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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Dumping roles improvements?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: COUNT(*) and index-only scans