From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: If backup-end record is not seen, and we reach end of recovery f |
Date: | 2011-08-17 08:46:45 |
Message-ID: | E1Qtblt-0008PQ-9T@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
If backup-end record is not seen, and we reach end of recovery from a
streamed backup, throw an error and refuse to start up. The restore has not
finished correctly in that case and the data directory is possibly corrupt.
We already errored out in case of archive recovery, but could not during
crash recovery because we couldn't distinguish between the case that
pg_start_backup() was called and the database then crashed (must not error,
data is OK), and the case that we're restoring from a backup and not all
the needed WAL was replayed (data can be corrupt).
To distinguish those cases, add a line to backup_label to indicate
whether the backup was taken with pg_start/stop_backup(), or by streaming
(ie. pg_basebackup).
This is a different implementation than what I committed to 9.2 a week ago.
That implementation was not back-patchable because it required re-initdb.
Fujii Masao
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/59dd4790e24b2fdffe85b8d3664a8374303cca24
Modified Files
--------------
src/backend/access/transam/xlog.c | 61 +++++++++++++++++++++++-------------
1 files changed, 39 insertions(+), 22 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-08-17 09:02:17 | Re: [COMMITTERS] pgsql: Adjust total size in pg_basebackup progress report when reality |
Previous Message | Peter Eisentraut | 2011-08-17 07:56:42 | pgsql: Move \r out of translatable strings |