Re: Online base backup from the hot-standby - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Online base backup from the hot-standby
Date
Msg-id CAHGQGwGDXtKM-=3USZNQJvT6phhALN232eQwADSq_WdKnBATbg@mail.gmail.com
Whole thread Raw
In response to Re: Online base backup from the hot-standby  (Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>)
List pgsql-hackers
2011/10/19 Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>:
>> As I suggested in the reply to Simon, I think that the change of FPW
>> should be WAL-logged separately from that of HS parameters. ISTM
>> packing them in one WAL record makes XLogReportParameters()
>> quite confusing. Thought?
>
> I updated a patch for what you have suggested (that the change of FPW
> should be WAL-logged separately from that of HS parameters).
>
> I want to base on this patch if there are no other opinions.

Thanks for updating the patch!

Attached is the updated version of the patch. I merged your patch into
standby_online_backup_09_fujii.patch, refactored the code, fixed some
bugs, added lots of source code comments, but didn't change the basic
design that you proposed.

In your patch, FPW is always WAL-logged at startup even when FPW has
not been changed since last shutdown. I don't think that's required.
I changed the recovery code so that it keeps track of last FPW indicated
by WAL record. Then, at end of startup, if that FPW is equal to FPW
specified in postgresql.conf (which means that FPW has not been changed
since last shutdown or crash), WAL-logging of FPW is skipped. This change
prevents unnecessary WAL-logging. Thought?

Is the patch well-formed enough to mark as ready-for-committer? It would
be very helpful if you review the patch.

Regards,

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

Attachment

pgsql-hackers by date:

Previous
From: "Omar Bettin"
Date:
Subject: R: [9.1] unusable for large views (SOLVED)
Next
From: Robert Haas
Date:
Subject: Re: autovacuum and orphaned large objects