Re: Online base backup from the hot-standby

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>
Cc: ssinger_pg(at)sympatico(dot)ca, simon(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org, 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-24 12:29:20
Message-ID: CAHGQGwGDXtKM-=3USZNQJvT6phhALN232eQwADSq_WdKnBATbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/10/19 Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)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 Content-Type Size
standby_online_backup_10_fujii.patch text/x-diff 50.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-10-24 12:40:36 Re: Updated version of pg_receivexlog
Previous Message Omar Bettin 2011-10-24 11:56:00 R: [9.1] unusable for large views (SOLVED)