aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2010-01-26 00:07:13 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2010-01-26 00:07:13 +0000
commitaed1a0121ae68bdacf737b0bae7fb75f48644f21 (patch)
treed363cbadd90afd8f34f02a36f4dcf82bd673fdf4 /src
parent9507c8a1db14d022296144f391ea4741f4f848ca (diff)
downloadpostgresql-aed1a0121ae68bdacf737b0bae7fb75f48644f21.tar.gz
postgresql-aed1a0121ae68bdacf737b0bae7fb75f48644f21.zip
Fix longstanding gripe that we check for 0000000001.history at start of
archive recovery, even when we know it is never present.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlog.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 004ea0a46bf..1eb877e5fcb 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.360 2010/01/23 16:37:12 sriggs Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.361 2010/01/26 00:07:13 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4142,6 +4142,10 @@ readTimeLineHistory(TimeLineID targetTLI)
char fline[MAXPGPATH];
FILE *fd;
+ /* Timeline 1 does not have a history file, so no need to check */
+ if (targetTLI == 1)
+ return list_make1_int((int) targetTLI);
+
if (InArchiveRecovery)
{
TLHistoryFileName(histfname, targetTLI);
@@ -4227,6 +4231,10 @@ existsTimeLineHistory(TimeLineID probeTLI)
char histfname[MAXFNAMELEN];
FILE *fd;
+ /* Timeline 1 does not have a history file, so no need to check */
+ if (probeTLI == 1)
+ return false;
+
if (InArchiveRecovery)
{
TLHistoryFileName(histfname, probeTLI);