pgsql: Fix tli history file fetching, broken by the archive after crash

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix tli history file fetching, broken by the archive after crash
Date: 2013-03-07 10:34:33
Message-ID: E1UDY9h-0003Zj-CP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix tli history file fetching, broken by the archive after crash recevery patch.

If we were about to enter archive recovery after crash recovery, we scanned
the archive for the latest tli history file, and set the recovery target
timeline to that. However, when we actually tried to read the history file,
we would not fetch the file from the archive, because we were not in archive
recovery yet.

To fix, make readTimeLineHistory and existsTimeLineHistory to always fetch
the file from archive if archive recovery is requested, even if we're not in
archive recovery yet.

Backpatch to 9.2. Mitsumasa KONDO

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7ccefe8610db8b339bad2c5b51abc07448a32947

Modified Files
--------------
src/backend/access/transam/timeline.c | 6 +++---
src/backend/access/transam/xlog.c | 8 +-------
src/include/access/xlog_internal.h | 1 +
3 files changed, 5 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2013-03-07 15:55:29 Re: Materialized views WIP patch
Previous Message Simon Riggs 2013-03-07 08:55:04 Re: Materialized views WIP patch