| From: | Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp> | 
|---|---|
| To: | simon(at)2ndQuadrant(dot)com, pgsql-hackers(at)postgresql(dot)org | 
| Cc: | masao(dot)fujii(at)gmail(dot)com, ssinger_pg(at)sympatico(dot)ca, magnus(at)hagander(dot)net, robertmhaas(at)gmail(dot)com, cedric(dot)villemain(dot)debian(at)gmail(dot)com, heikki(dot)linnakangas(at)enterprisedb(dot)com | 
| Subject: | Re: Online base backup from the hot-standby | 
| Date: | 2011-10-11 15:17:27 | 
| Message-ID: | 201110111518.p9BFIhpk032107@ccmds32.silk.ntts.co.jp | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> > I can't see a reason why we would use a new WAL record for this,
> > rather than modify the XLOG_PARAMETER_CHANGE record type which was
> > created for a very similar reason.
> > The code would be much simpler if we just extend
> > XLOG_PARAMETER_CHANGE, so please can we do that?
> 
> Sure.
> 
> > The log message "full_page_writes on master is set invalid more than
> > once during online backup" should read "at least once" rather than
> > "more than once".
> 
> Yes.
> 
> > lastFpwDisabledLSN needs to be initialized.
> 
> I think it don't need because all values in XLogCtl is initialized 0.
> 
> > Is there a reason to add lastFpwDisabledLSN onto the Control file? If
> > we log parameters after every checkpoint then we'll know the values
> > when we startup. If we keep logging parameters this way we'll end up
> > with a very awkward and large control file. I would personally prefer
> > to avoid that, but that thought could go either way. Let's see if
> > anyone else thinks that also.
> 
> Yes. I add to CreateCheckPoint().
> 
> Image:
>   CreateCheckPoint()
>   {
>      if (!shutdown && XLogStandbyInfoActive())
>      {
>         LogStandbySnapshot()
>         XLogReportParameters()
>      }
>    }
> 
>   XLogReportParameters()
>   {
>      if (fpw == 'off' || ... )
>          XLOGINSERT()
>   }
> 
> However, it'll write XLOG_PARAMETER_CHANGE every checkpoints when FPW is 'off'.
> (It will increases the amount of WAL.)
> Is it OK?
Done.
Updated patch attached.
Regards.
--------------------------------------------
Jun Ishizuka
NTT Software Corporation
TEL:045-317-7018
E-Mail: ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp
--------------------------------------------
| Attachment | Content-Type | Size | 
|---|---|---|
| standby_online_backup_09base-02fpw.patch | application/octet-stream | 10.7 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2011-10-11 15:48:58 | Re: Overhead cost of Serializable Snapshot Isolation | 
| Previous Message | Bruce Momjian | 2011-10-11 15:05:18 | Re: SET variable - Permission issues |