1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-28 09:33:54 +02:00

Merge branch 'master' of git.postgrespro.ru:pgpro-dev/pg_probackup

This commit is contained in:
Anastasia 2017-04-19 18:00:09 +03:00
commit e1d003bb6c
4 changed files with 9 additions and 9 deletions

View File

@ -551,11 +551,11 @@ parse_backup_mode(const char *value)
v++;
len = strlen(v);
if (len > 0 && pg_strncasecmp("full", v, strlen("full")) == 0)
if (len > 0 && pg_strncasecmp("full", v, len) == 0)
return BACKUP_MODE_FULL;
else if (len > 0 && pg_strncasecmp("page", v, strlen("page")) == 0)
else if (len > 0 && pg_strncasecmp("page", v, len) == 0)
return BACKUP_MODE_DIFF_PAGE;
else if (len > 0 && pg_strncasecmp("ptrack", v, strlen("ptrack")) == 0)
else if (len > 0 && pg_strncasecmp("ptrack", v, len) == 0)
return BACKUP_MODE_DIFF_PTRACK;
/* Backup mode is invalid, so leave with an error */
@ -609,4 +609,4 @@ pgBackupGetPath(const pgBackup *backup, char *path, size_t len, const char *subd
free(datetime);
make_native_path(path);
}
}

6
data.c
View File

@ -78,9 +78,9 @@ backup_data_page(pgFile *file, const XLogRecPtr *prev_backup_start_lsn,
/* TODO Should we check specific error code here? */
if (verbose)
elog(WARNING, "File: %s, could not seek to block %u."
"Probably the file was truncated after backup start.",
file->path, blknum);
return;
"Probably the file was truncated after backup start.",
file->path, blknum);
return;
}
read_len = fread(&page, 1, BLCKSZ, in);

View File

@ -215,7 +215,7 @@ do_restore_or_validate(time_t target_backup_id,
{
pgBackup *backup = (pgBackup *) parray_get(backups, i);
if (backup->status == BACKUP_STATUS_OK);
if (backup->status == BACKUP_STATUS_OK)
{
pgBackupValidate(backup);

2
show.c
View File

@ -195,7 +195,7 @@ show_backup_list(FILE *out, parray *backup_list)
/* Get parent timeline before printing */
parent_tli = get_parent_tli(backup->tli);
fprintf(out, "%-8s %-19s %s%s %2d / %-2d %5s %6s %2X/%08X %2X/%08X %-8s\n",
fprintf(out, "%-8s %-19s %s%-9s %2d / %d %5s %6s %2X/%08X %2X/%08X %-8s\n",
base36enc(backup->start_time),
timestamp,
backupModes[backup->backup_mode],