Skip site navigation (1) Skip section navigation (2)

Re: Problem with streaming replication, backups, and recovery (9.0.x)

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: depesz(at)depesz(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with streaming replication, backups, and recovery (9.0.x)
Date: 2011-03-29 15:54:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 29.03.2011 14:27, Fujii Masao wrote:
> On Tue, Mar 29, 2011 at 6:46 PM, hubert depesz lubaczewski
> <depesz(at)depesz(dot)com>  wrote:
>>> Did you use recovery.conf to start standalone PostgreSQL? If not,
>>> recovery doesn't check whether it reaches the recovery ending position
>>> or not. So I guess no problem didn't happen.
>> no, i don't use.
>> hmm .. i am nearly 100% certain that previous pgs did in fact check if the end
>> of recovery is reached.
> Yes. In 8.4, that was checked only when starting recovery from the backup
> (i.e., which includes backup_label and backup history file) without
> recovery.conf.
> But in 9.0, the behavior was changed so that only archive recovery (i.e., with
> recovery.conf) checks that. IIRC, we don't have strong opinion about
> this change.
> We should revert, in order to make even crash recovery check whether it
> reaches the ending location?

Hmm, why did we change that? It seems like a mistake, the database is 
not consistent until you reach the backup stop location, whether or not 
you're doing archive recovery. +1 for reverting that, and backpatching 
it as well.

"pg_basebackup -x", which includes all the WAL required to restore in 
the pg_xlog directory of the base backup itself, is also affected. 
Without the check that you reach the end-of-backup, an aborted base 
backup will appear to restore fine, even though some WAL segments are 
missing and the backup is incomplete.

   Heikki Linnakangas

In response to


pgsql-hackers by date

Next:From: Steve CrawfordDate: 2011-03-29 16:02:52
Subject: Re: Date conversion using day of week
Previous:From: Adrian KlaverDate: 2011-03-29 15:50:56
Subject: Re: Date conversion using day of week

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group