1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-12 11:45:24 +02:00

Merge branch 'master' into stable

This commit is contained in:
Arthur Zakirov 2018-08-08 17:31:16 +03:00
commit 2440638d90
7 changed files with 23 additions and 14 deletions

View File

@ -543,9 +543,11 @@ do_backup_instance(void)
if (ptrack_lsn > prev_backup->stop_lsn || ptrack_lsn == InvalidXLogRecPtr)
{
elog(ERROR, "LSN from ptrack_control %lx differs from STOP LSN of previous backup %lx.\n"
elog(ERROR, "LSN from ptrack_control %X/%X differs from STOP LSN of previous backup %X/%X.\n"
"Create new full backup before an incremental one.",
ptrack_lsn, prev_backup->stop_lsn);
(uint32) (ptrack_lsn >> 32), (uint32) (ptrack_lsn),
(uint32) (prev_backup->stop_lsn >> 32),
(uint32) (prev_backup->stop_lsn));
}
}
@ -1032,11 +1034,13 @@ check_system_identifiers(void)
system_id_conn = get_remote_system_identifier(backup_conn);
if (system_id_conn != system_identifier)
elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld",
system_identifier, system_id_conn);
elog(ERROR, "Backup data directory was initialized for system id " UINT64_FORMAT ", "
"but connected instance system id is " UINT64_FORMAT,
system_identifier, system_id_conn);
if (system_id_pgdata != system_identifier)
elog(ERROR, "Backup data directory was initialized for system id %ld, but target backup directory system id is %ld",
system_identifier, system_id_pgdata);
elog(ERROR, "Backup data directory was initialized for system id " UINT64_FORMAT ", "
"but target backup directory system id is " UINT64_FORMAT,
system_identifier, system_id_pgdata);
}
/*

View File

@ -897,7 +897,7 @@ PrintXLogCorruptionMsg(XLogPageReadPrivate *private_data, int elevel)
"Error has occured during reading WAL segment \"%s\"",
private_data->xlogpath);
#ifdef HAVE_LIBZ
else if (private_data->gz_xlogpath != NULL)
else if (private_data->gz_xlogfile != NULL)
elog(elevel, "Possible WAL corruption. "
"Error has occured during reading WAL segment \"%s\"",
private_data->gz_xlogpath);

View File

@ -63,8 +63,6 @@
#define PG_BLACK_LIST "black_list"
#define PG_TABLESPACE_MAP_FILE "tablespace_map"
#define LOG_FILENAME_DEFAULT "pg_probackup.log"
#define LOG_DIRECTORY_DEFAULT "log"
/* Direcotry/File permission */
#define DIR_PERMISSION (0700)
#define FILE_PERMISSION (0600)
@ -206,7 +204,7 @@ typedef struct pgBackupConfig
typedef struct pgBackup pgBackup;
/* Information about single backup stored in backup.conf */
typedef struct pgBackup
struct pgBackup
{
BackupMode backup_mode; /* Mode - one of BACKUP_MODE_xxx above*/
time_t backup_id; /* Identifier of the backup.
@ -255,7 +253,7 @@ typedef struct pgBackup
pgBackup *parent_backup_link;
char *primary_conninfo; /* Connection parameters of the backup
* in the format suitable for recovery.conf */
} pgBackup;
};
/* Recovery target for restore and validate subcommands */
typedef struct pgRecoveryTarget
@ -406,7 +404,7 @@ extern void process_block_change(ForkNumber forknum, RelFileNode rnode,
BlockNumber blkno);
extern char *pg_ptrack_get_block(backup_files_arg *arguments,
Oid dbOid, Oid tblsOid, Oid relOid,
Oid dbOid, Oid tblsOid, Oid relOid,
BlockNumber blknum,
size_t *result_size);
/* in restore.c */

View File

@ -15,7 +15,6 @@
#include "logger.h"
#include "pgut.h"
#include "pg_probackup.h"
#include "thread.h"
/* Logger parameters */

View File

@ -42,6 +42,9 @@ extern int log_rotation_age;
#define LOG_LEVEL_CONSOLE_DEFAULT INFO
#define LOG_LEVEL_FILE_DEFAULT LOG_OFF
#define LOG_FILENAME_DEFAULT "pg_probackup.log"
#define LOG_DIRECTORY_DEFAULT "log"
#undef elog
extern void elog(int elevel, const char *fmt, ...) pg_attribute_printf(2, 3);
extern void elog_file(int elevel, const char *fmt, ...) pg_attribute_printf(2, 3);

View File

@ -7,7 +7,8 @@
*-------------------------------------------------------------------------
*/
#include "src/pg_probackup.h"
#include "parray.h"
#include "pgut.h"
/* members of struct parray are hidden from client. */
struct parray

View File

@ -10,6 +10,10 @@
#ifndef PARRAY_H
#define PARRAY_H
#include "postgres_fe.h"
#include <stdlib.h>
/*
* "parray" hold pointers to objects in a linear memory area.
* Client use "parray *" to access parray object.