Skip to content

Commit fe5d234

Browse files
committed
Merge branch 'master' into release_2_4
2 parents fd36a51 + 5699b13 commit fe5d234

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
@@ -100,7 +100,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
100100
{
101101
int i = 0;
102102
int j = 0;
103-
parray *backups;
103+
parray *backups = NULL;
104104
pgBackup *tmp_backup = NULL;
105105
pgBackup *current_backup = NULL;
106106
pgBackup *dest_backup = NULL;
@@ -476,13 +476,14 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
476476
/* ssh connection to longer needed */
477477
fio_disconnect();
478478

479+
elog(INFO, "%s of backup %s completed.",
480+
action, base36enc(dest_backup->start_time));
481+
479482
/* cleanup */
480483
parray_walk(backups, pgBackupFree);
481484
parray_free(backups);
482485
parray_free(parent_chain);
483486

484-
elog(INFO, "%s of backup %s completed.",
485-
action, base36enc(dest_backup->start_time));
486487
return 0;
487488
}
488489

0 commit comments

Comments
 (0)