Re: Online base backup from the hot-standby

Поиск
Список
Период
Сортировка
От Steve Singer
Тема Re: Online base backup from the hot-standby
Дата
Msg-id BLU0-SMTP5407C38727DD3B79FAC1D28EC10@phx.gbl
обсуждение исходный текст
Ответ на Re: Online base backup from the hot-standby  (Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>)
Ответы Re: Online base backup from the hot-standby  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On 11-10-31 12:11 AM, Jun Ishiduka wrote: <blockquote cite="mid:201110310412.p9V4Cxxn013989@ccmds32.silk.ntts.co.jp"
type="cite"><blockquotetype="cite"><br /><pre wrap="">Agreed. I'll extract FPW stuff from the patch that I submitted,
andrevise it
 
as the infrastructure patch.

The changes of pg_start_backup() etc that Ishiduka-san did are also
a server-side infrastructure. I will extract them as another infrastructure one.

Ishiduka-san, if you have time, feel free to try the above, barring objection.
</pre></blockquote><pre wrap="">

Done.
Changed the name of the patch.

<Modifications>So changed to the positioning of infrastructure,  * Removed the documentation.  * changed to an
errorwhen you run pg_start/stop_backup() on the standby.
 


</pre></blockquote><br /> Here is my stab at reviewing this version of this version of the patch.<br /><br />
Submission<br/> -------------------<br /> The purpose of this version of the patch is to provide some infrastructure
neededfor backups from the slave without having to solve some of the usability issues raised in previous versions of
thepatch. <br /><br /> This patch applied fine earlier versions of head but it doesn't today.  Simon moved some of the
codetouched by this patch as part of the xlog refactoring.  Please post an updated/rebased version of the patch.<br
/><br/><br /> I think the purpose of this patch is to provide<br /><br /> a) The code changes to record changes to fpw
stateof the master in WAL.<br /> b) Track the state of FPW while in recovery mode<br /><br /> This version of the patch
isNOT intended to allow SQL calls to pg_start_backup() on slaves to work.   This patch lays the infrastructure for
anotherpatch (which I haven't seen) to allow pg_basebackup to do a base backup from a slave assuming fpw=on has been
seton the master (my understanding of this patch is that it puts into place all of the pieces required for the
pg_basebackuppatch to detect if fpw!=on and abort).<br /><br /><br /> The consensus upthread was to get this
infrastructurein and figure out a safe+usable way of doing a slave backup without pg_basebackup later. <br /><br /> The
patchseems to do what I expect of it.<br /><br /> I don't see any issues with most of the code changes in this patch. 
HoweverI admit that even after reviewing many versions of this patch I still am not familiar enough with the recovery
codeto comment on a lot of the details. <br /><br /> One thing I did see:<br /><br /> In pg_ctl.c<br /><br /> !        
   if (stat(recovery_file, &statbuf) != 0)<br /> !                 print_msg(_("WARNING: online backup mode is
active\n"<br/> !                             "Shutdown will not complete until pg_stop_backup() is called.\n\n"));<br
/>!             else<br /> !                 print_msg(_("WARNING: online backup mode is active if you can connect as a
superuserto server\n"<br /> !                             "If so, shutdown will not complete until pg_stop_backup() is
called.\n\n"));<br/>       <br /> I am having difficulty understanding what this error message is trying to tell me.  
Ithink it is telling me (based on the code comments) that if I can't connect to the server because the server is not
yetaccepting connections then I shouldn't worry about anything.   However if the server is accepting connections then I
needto login and call pg_stop_backup().   <br /><br /> Maybe <br /> "WARNING:  online backup mode is active.  If your
serveris accepting  connections then you must connect as superuser and run pg_stop_backup() before shutdown will
complete"<br/><br /> I will wait on attempting to test the patch until you have sent a version that applies against the
currentHEAD.<br /><br /><br /><blockquote cite="mid:201110310412.p9V4Cxxn013989@ccmds32.silk.ntts.co.jp"
type="cite"><prewrap="">Regards.
 


--------------------------------------------
Jun Ishizuka
NTT Software Corporation
TEL:045-317-7018
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:ishizuka.jun@po.ntts.co.jp">ishizuka.jun@po.ntts.co.jp</a>
--------------------------------------------
</pre> <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>

</pre></blockquote><br />

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Core Extensions relocation
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Core Extensions relocation