Skip to content

Commit aed1a01

Browse files
Fix longstanding gripe that we check for 0000000001.history at start of
archive recovery, even when we know it is never present.
1 parent 9507c8a commit aed1a01

File tree

1 file changed

+9
-1
lines changed
  • src/backend/access/transam

1 file changed

+9
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.360 2010/01/23 16:37:12 sriggs Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.361 2010/01/26 00:07:13 sriggs Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -4142,6 +4142,10 @@ readTimeLineHistory(TimeLineID targetTLI)
41424142
char fline[MAXPGPATH];
41434143
FILE *fd;
41444144

4145+
/* Timeline 1 does not have a history file, so no need to check */
4146+
if (targetTLI == 1)
4147+
return list_make1_int((int) targetTLI);
4148+
41454149
if (InArchiveRecovery)
41464150
{
41474151
TLHistoryFileName(histfname, targetTLI);
@@ -4227,6 +4231,10 @@ existsTimeLineHistory(TimeLineID probeTLI)
42274231
char histfname[MAXFNAMELEN];
42284232
FILE *fd;
42294233

4234+
/* Timeline 1 does not have a history file, so no need to check */
4235+
if (probeTLI == 1)
4236+
return false;
4237+
42304238
if (InArchiveRecovery)
42314239
{
42324240
TLHistoryFileName(histfname, probeTLI);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy