Re: Backup history file should be replicated in Streaming Replication?

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Backup history file should be replicated in Streaming Replication?
Date: 2009-12-22 17:42:12
Message-ID: 1261503732.7442.6587.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2009-11-26 at 17:02 +0900, Fujii Masao wrote:
> On Thu, Nov 26, 2009 at 4:55 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> > Fujii Masao wrote:
> >> In current SR, since a backup history file is not replicated,
> >> the standby always starts an archive recovery without a backup
> >> history file, and a wrong minRecoveryPoint might be used. This
> >> is not a problem for SR itself, but would cause trouble when
> >> SR cooperates with Hot Standby.
> >
> > But the backup history file is included in the base backup you start
> > replication from, right?
>
> No. A backup history file is created by pg_stop_backup().
> So it's not included in the base backup.

The backup history file is a slightly bit quirky way of doing things and
was designed when the transfer mechanism was file-based.

Why don't we just write a new xlog record that contains the information
we need? Copy the contents of the backup history file into the WAL
record, just like we do with prepared transactions. That way it will be
streamed to the standby without any other code being needed for SR,
while we don't need to retest warm standby to check that still works
also.

(The thread diverges onto a second point and this first point seems to
have been a little forgotten)

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-12-22 17:49:24 Re: Backup history file should be replicated in Streaming Replication?
Previous Message Heikki Linnakangas 2009-12-22 17:30:23 Re: alpha3 release schedule?