mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Fix longstanding gripe that we check for 0000000001.history at start of
archive recovery, even when we know it is never present.
This commit is contained in:
parent
9507c8a1db
commit
aed1a0121a
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* 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];
|
char fline[MAXPGPATH];
|
||||||
FILE *fd;
|
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)
|
if (InArchiveRecovery)
|
||||||
{
|
{
|
||||||
TLHistoryFileName(histfname, targetTLI);
|
TLHistoryFileName(histfname, targetTLI);
|
||||||
@ -4227,6 +4231,10 @@ existsTimeLineHistory(TimeLineID probeTLI)
|
|||||||
char histfname[MAXFNAMELEN];
|
char histfname[MAXFNAMELEN];
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
|
|
||||||
|
/* Timeline 1 does not have a history file, so no need to check */
|
||||||
|
if (probeTLI == 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (InArchiveRecovery)
|
if (InArchiveRecovery)
|
||||||
{
|
{
|
||||||
TLHistoryFileName(histfname, probeTLI);
|
TLHistoryFileName(histfname, probeTLI);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user