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

Re: backup_label during crash recovery: do we know how to solve it?

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: backup_label during crash recovery: do we know how to solve it?
Date: 2011-12-03 16:04:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 03.12.2011 01:25, Daniel Farina wrote:
> Here's a protocol: have pg_start_backup() write a file that just means
> "backing up".  Restarts are OK, because that's all it means, it has no
> meaning to a recovery/restoration process.
> When one wishes to restore, one must touch a file -- not unlike the
> trigger file in recovery.conf (some have argued in the past this
> *should* be recovery.conf, except perhaps for its tendency to be moved
> to recovery.done) to have that behavior occur.

At the moment, if the situation is ambiguous, the system assumes that 
you're restoring from a backup. What your suggestion amounts to is to 
reverse tht assumption, and assume instead that you're doing crash 
recovery on a system where a backup was being taken. In that case, if 
you take a backup with pg_base_backup(), and fail to archive the WAL 
files correctly, or forget to create a recovery.conf file, the database 
will happily start up from the backup, but is in fact corrupt. That is 
not good either.

   Heikki Linnakangas

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2011-12-03 16:37:14
Subject: Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)
Previous:From: Magnus HaganderDate: 2011-12-03 14:59:46
Subject: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

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