Skip to content

Commit 6bd66de

Browse files
committed
Merge branch 'release_2_4' into issue_66
2 parents 1584caa + fe5d234 commit 6bd66de

File tree

3 files changed

+9
-22
lines changed

3 files changed

+9
-22
lines changed

src/data.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -353,17 +353,6 @@ prepare_page(ConnectionArgs *conn_arg,
353353
Assert(false);
354354
}
355355
}
356-
357-
/*
358-
* If ptrack support is available, use it to get invalid block
359-
* instead of rereading it 99 times
360-
*/
361-
if (!page_is_valid && strict && ptrack_version_num > 0)
362-
{
363-
elog(WARNING, "File \"%s\", block %u, try to fetch via shared buffer",
364-
from_fullpath, blknum);
365-
break;
366-
}
367356
}
368357

369358
/*
@@ -385,7 +374,7 @@ prepare_page(ConnectionArgs *conn_arg,
385374
/* Error out in case of merge or backup without ptrack support;
386375
* issue warning in case of checkdb or backup with ptrack support
387376
*/
388-
if (!strict || (strict && ptrack_version_num > 0))
377+
if (!strict)
389378
elevel = WARNING;
390379

391380
if (errormsg)
@@ -396,16 +385,12 @@ prepare_page(ConnectionArgs *conn_arg,
396385
from_fullpath, blknum);
397386

398387
pg_free(errormsg);
388+
return PageIsCorrupted;
399389
}
400390

401391
/* Checkdb not going futher */
402392
if (!strict)
403-
{
404-
if (page_is_valid)
405-
return PageIsOk;
406-
else
407-
return PageIsCorrupted;
408-
}
393+
return PageIsOk;
409394
}
410395

411396
/*

src/parsexlog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,8 @@ get_next_record_lsn(const char *archivedir, XLogSegNo segno,
691691
{
692692
XLogReaderState *xlogreader;
693693
XLogReaderData reader_data;
694-
XLogRecPtr startpoint, found, res;
694+
XLogRecPtr startpoint, found;
695+
XLogRecPtr res = InvalidXLogRecPtr;
695696
char wal_segment[MAXFNAMELEN];
696697
int attempts = 0;
697698

src/restore.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
106106
{
107107
int i = 0;
108108
int j = 0;
109-
parray *backups;
109+
parray *backups = NULL;
110110
pgBackup *tmp_backup = NULL;
111111
pgBackup *current_backup = NULL;
112112
pgBackup *dest_backup = NULL;
@@ -563,13 +563,14 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
563563
/* ssh connection to longer needed */
564564
fio_disconnect();
565565

566+
elog(INFO, "%s of backup %s completed.",
567+
action, base36enc(dest_backup->start_time));
568+
566569
/* cleanup */
567570
parray_walk(backups, pgBackupFree);
568571
parray_free(backups);
569572
parray_free(parent_chain);
570573

571-
elog(INFO, "%s of backup %s completed.",
572-
action, base36enc(dest_backup->start_time));
573574
return 0;
574575
}
575576

0 commit comments

Comments
 (0)