Re: Online base backup from the hot-standby

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>, ssinger_pg <ssinger_pg@sympatico.ca>, magnus <magnus@hagander.net>, robertmhaas <robertmhaas@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, "cedric.villemain.debian" <cedric.villemain.debian@gmail.com>, "heikki.linnakangas" <heikki.linnakangas@enterprisedb.com>
Date: 2011-10-13T13:44:50Z
Lists: pgsql-hackers
On Mon, Oct 10, 2011 at 3:56 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> 2011/10/9 Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>:
>
>>  Insert WAL including a value of current FPW (on master)
>>   * In the the same timing as update, they insert WAL (is named
>>     XLOG_FPW_CHANGE). XLOG_FPW_CHANGE has a value of the changed FPW.
>>   * When it creates CHECKPOINT, it adds a value of current FPW to the
>>     CHECKPOINT WAL.
>
> 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?

After reading Ishiduka-san's patch, I'm thinking the opposite because
(1) Whenever full_page_writes must be WAL-logged, there is no need
to WAL-log the HS parameters. The opposite is also true. (2) How
full_page_writes record should be replayed is quite different from
how HS parameters record is.

So ISTM that the code would be simpler if we introduce new WAL
record for full_page_writes. Thought?

Regards,

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