Re: Online base backup from the hot-standby

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>, ssinger_pg(at)sympatico(dot)ca, cedric(dot)villemain(dot)debian(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Online base backup from the hot-standby
Date: 2011-08-17 12:40:15
Message-ID: CA+Tgmob+YmAohMObqbfieZLZz6A6EMrBU+_5YCzQtADppJ2TiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 17, 2011 at 6:19 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> 2011/8/17 Jun Ishiduka <ishizuka(dot)jun(at)po(dot)ntts(dot)co(dot)jp>:
>>> I see in xlog.h XLR_BKP_REMOVABLE, the comment above it says that this
>>> flag is used to indicate that the archiver can compress the full page
>>> blocks to non-full page blocks. I am not familiar with where in the code
>>> this actually happens but will this cause issues if the first standby is
>>> processing WAL files from the archive?
>>
>> I confirmed the flag in xlog.c, so I seemed to only insert it in
>> XLogInsert(). I consider whether it is available.
>
> That flag is not available to check whether full-page writing was
> skipped or not.
> Because it's in full-page data, not non-full-page one.
>
> The straightforward approach to address the problem you raised is to log
> the change of full_page_writes on the master. Since such a WAL record is also
> replicated to the standby, the standby can know whether full_page_writes is
> enabled or not in the master, from the WAL record. If it's disabled,
> pg_start_backup() in the standby should emit an error and refuse standby-only
> backup. If the WAL record indicating that full_page_writes was disabled
> on the master arrives during standby-only backup, the standby should cancel
> the backup.

Seems like something we could add to XLOG_PARAMETER_CHANGE fairly easily.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message PostgreSQL - Hans-Jürgen Schönig 2011-08-17 12:44:00 Re: Caching Python modules
Previous Message Robert Haas 2011-08-17 12:37:06 Re: Backup's from standby