pgsql: Fix tli history file fetching, broken by the archive after crash - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix tli history file fetching, broken by the archive after crash
Date
Msg-id E1UDY9h-0003Zn-EO@gemulon.postgresql.org
Whole thread Raw
List 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
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/51616dcda47a416ef3169dc3d1f3ca199d7a4a5d

Modified Files
--------------
src/backend/access/transam/xlog.c |   10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Further fix to the mode where we enter archive recovery after cr
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix tli history file fetching, broken by the archive after crash